-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle owncloud migration to latest release #23044
Conversation
In a fresh install of NC 20 the app column still has 32 characters, same in activity master. |
ok, got it, it's the other way around... |
regarding bigints I think we should add these to NC (and not convert bigint to int in NC) not sure if such change would be backported to NC 20 (if DB changes are allowed in minor releases), so might only arrive with NC 21 then ? |
oc_dav_job_status is for pending asynchronous/lazy operations: https://github.com/owncloud/core/blob/master/apps/dav/lib/DAV/LazyOpsPlugin.php#L65 we can delete it as it shouldn't contain any active entries during a migration |
oc_dav_properties is using fileid to map DAV properties so that they can survive renames Given that oc_properties only contains the path, DAV properties will likely get lost when renaming through some code paths. Maybe to keep oc_properties we could put a file id into the "propertiespath" column or add a new fileid (or objectid) column ? Or in theory we could also discard (or keep for later) that table, in case whatever properties exist in there is anyway irrelevant for NC apps. Note that sometimes when Webdav is mounted as a Windows drive it will add a lot of Windows-specific properties. Deleting these shouldn't cause any issue as Windows would re-populate the next time. |
Thanks a lot for digging into this already :)
Yes, definitely. At least bigint conversions are fine for minor releases if we let the user do the migration through
@rullzer what do you think? |
3a3991b
to
4425bf7
Compare
I'd actually say we can go that way. We just recreate the table then with our format and mainly need to migrate oc_dav_properties from that to ours. For that migration I'm not entirely sure if there is any other relevant properties than calendar ones (cc @skjnldsv does store contacts some in there as well) we could just extract the user id from the propertypath, but my DAV internal knowledge is a bit limited in that regard. So any input welcome. Maybe @icewind1991 or @rullzer can also have a look if that makes sense. For the ownCloud oc_dav_properties migration to oc_properties i would just try to match against /calendar/userid/ and extract the userid for our table format from that.
The propertytype introduced in owncloud/core#37314 is also most likely irrelevant for us for now. |
How did you get to that userid? shouldn't it be admin then? |
Woops, must have been a copy past error when trying to align copied dumps from the the two instances i had. Yes that would of course be admin. |
d24ec24
to
7520da6
Compare
$column->setUnsigned(true); | ||
} else { | ||
$table->addColumn('remember', 'smallint', [ | ||
'notnull' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, there were actually some more columns affected by that in the authtoken table
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This reverts commit d9b1492. Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
353d6f3
to
82c3f16
Compare
use OC\BackgroundJob\QueuedJob; | ||
use OCP\Files\IRootFolder; | ||
use OCP\Files\NotFoundException; | ||
use OCP\Files\Storage; | ||
use OCP\IAvatarManager; | ||
use OCP\ILogger; | ||
use OCP\IUser; | ||
use OCP\IUserManager; | ||
use Psr\Log\LoggerInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐘
as the files are not scanned we cannot use the OCP\Files api Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net> Revert "Make sure the migrations table schema is always checked" This reverts commit 258955e. Set current vendor during upgrade and perform migrations table change if needed Signed-off-by: Julius Härtl <jus@bitgrid.net>
f6da1c3
to
36ffad5
Compare
/backport to stable20 |
seems we missed oc_share_external: #24813 |
|
||
if ($schema->hasTable('systemtag')) { | ||
$table = $schema->getTable('systemtag'); | ||
if ($table->hasColumn('systemtag')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong check, this should be "hasColumn('assignable')"
Steps to migrate from 10.5 to this branch
Adjustments
In SchemaException.php line 85: There is no column with name 'userid' on table 'oc_properties'.
Missing from the database diff between 10.5 and 20
With this set of patches the migration succeed however there is some difference in the database schema that should be addressed:
addressbookid_uri_index
(addressbookid
,uri
),mounts_mount_id_index
(mount_id
)Removing data from database (core/Migrations/Version21000Date20201120141228.php)
Pulled out