-
Notifications
You must be signed in to change notification settings - Fork 2.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
doctrine migrations #14851
doctrine migrations #14851
Conversation
87fa50b
to
506442a
Compare
506442a
to
ec3ddc0
Compare
Is this still a topic for 8.2, or later ? |
(exciting topic) |
I would love to bring this into 8.2 giving apps the opportunity to use it. With e.g. 8.3 we can think about using it for core as well. |
@DeepDiver1975 needs rebase, and there are still some items in the TODO list. Move to 9.0 ? |
moving this to 9.1 - requires architectural decision by @owncloud/architecture |
Do we still need this ? I remember we discussed something about using repair steps / migration steps instead. @DeepDiver1975 |
We still need this as a replacment for the current DB XML magic |
a67a72d
to
b0bdafd
Compare
9687058
to
1435650
Compare
cf0c4cf
to
3203232
Compare
Maybe auto-create the migrations directory ? Steps:
|
also the target dir "customgroups/appinfo/Migrations" doesn't seem right, usually we put all classes into "lib" so I'd expect it to put to either "customgroups/appinfo/lib/Migrations" or "customgroups/appinfo/lib/AppInfo/Migrations" (and auto-create the folder if it doesn't exist) |
I created the folder manually for now, uh oh:
|
I thought that maybe I should enable the app first ? (doesn't make sense, but let's try it)
|
the folder is generated in here: https://github.com/owncloud/core/pull/14851/files#diff-333567435f8bef9975c29c5e73ab7dd0R50 - strange ... let me debug |
Generating migrations for an disabled app works for me $ ./occ migrations:generate testapp
Loading configuration from the integration code of your framework (setter).
Generated new migration class to "/home/deepdiver/Development/ownCloud/master-autotest/apps/testapp/appinfo/Migrations/Version20161209113613.php"
$ ll apps/testapp/appinfo/Migrations/Version20161209113613.php
-rw-r--r-- 1 deepdiver deepdiver 609 Dez 9 12:36 apps/testapp/appinfo/Migrations/Version20161209113613.php |
Ok then, I'll debug this myself |
It was a permissions issue: my workspace is under my own user but OCC needs to run as web server user. So web server user has no perms to create stuff in this app... I added a little check to see if |
ok, had some success after many struggles: initial DB creation works here owncloud/customgroups#11 |
After enabling customgroups on this branch owncloud/customgroups#11 the tables were created. Expected: new table created @DeepDiver1975 is that the correct way ? The table "oc_customgroups_migration_versions" only contains the first initial migration, so Doctrine should automatically know that it should run the second one. |
Yes. The new step should be executed. |
I put a breakpoint in |
Uh oh...
in I'll look into it... |
eval result:
'true' === true FACEPHPALM |
A bool is not always a bool...
Added 027979f Works now 👍 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
requires 3rdparty PR owncloud-archive/3rdparty#279
refs #13820
TODO: