-
Notifications
You must be signed in to change notification settings - Fork 73
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
use $schemaClosure in migration #2985
Conversation
Signed-off-by: notEvil <[email protected]>
Thanks. But should it not be enough to return the schema, used by the migration method? |
No, because in the context of convert-type it is has to operate on a different database. During migration, the class gets instantiated only once, remembering the source schema (say SQLite) in the process. However, it then needs to create the tables on the target schema (say Postgres) using the target connection. So it needs to delegate the actual execution to Nextcloud. |
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.
Sorry, my time is again limited, but now I had the time to look over it and check the aftermath of it. And find out there should none, since createTables is the only method called inside the migration atm, this should work and not break the commands.
It wasn't a good idea anyways to build this up with separate schemas for the tableManager and the indexManager, but I have this on my to do list for later.
New migrations according to the app version are preferred over changing migration methods, but in this particular situation I am sure it is ok.
TLDNR: LGTM
Thanks for contribution!! |
Fun fact. I am not even a programmer and had no clue of PHP or JS when I started contributing here . |
Interesting :) Regarding the failed check: |
Erks. I think, we need another approach. I will come back to it later. Currently I'm rather busy. |
Superseded by #3024 |
fixes #2980
Please note that I'm not particularly familiar with php and the codebase in general. The solution is a proposal.