Migrating Migrations Table from CI3 for existing databases |
(02-02-2023, 11:16 PM)kenjis Wrote:(02-02-2023, 10:55 PM)objecttothis Wrote: Following the current upgrade procedure starts migrations over, so it will re-run migrations 1-5. If we were talking about a single installation, then what you're saying would be fine. This is going into opensource software where we can't just have each user of the webapp spin up a development server, run migrations, then import to production. Even if we could, migrations would fail on the development copy of the production database for the same reason I described. The migrations I'm talking about from versions of the webapp prior to the CI4 changeover are not just database table structure changes. Some of them are data correction changes, so the migrations require the production data in order to work. Further, one user might be migrating from 1.0 of the webapp while another might be migrating from 1.0.12, so people will be at different points in the migration when they go to version 1.1 which is on CI4. This is why the 1.1 version of the webapp (on CI4) needs to start from where the previous CI3 migrations version number left off. I think I might understand what you mean now... If, on my dev box, I start from a clean install of the webapp, then run migrations against it so that it does all the migrations, I can then export that table and create a script which will need to run before the first CI4 migration and import all the rows up to the CI3 version on that install, then run migrations... that could work. I wish it was less complicated though. It would be nicer if migrate recognized the version number from CI3 migrations and didn't try to run migrations before that. |
Messages In This Thread |
Migrating Migrations Table from CI3 for existing databases - by objecttothis - 02-02-2023, 01:59 PM
RE: Migrating Migrations Table from CI3 for existing databases - by kenjis - 02-02-2023, 05:24 PM
RE: Migrating Migrations Table from CI3 for existing databases - by objecttothis - 02-02-2023, 10:55 PM
RE: Migrating Migrations Table from CI3 for existing databases - by kenjis - 02-02-2023, 11:16 PM
RE: Migrating Migrations Table from CI3 for existing databases - by objecttothis - 02-02-2023, 11:24 PM
RE: Migrating Migrations Table from CI3 for existing databases - by kenjis - 02-03-2023, 12:50 AM
RE: Migrating Migrations Table from CI3 for existing databases - by objecttothis - 02-03-2023, 12:57 AM
RE: Migrating Migrations Table from CI3 for existing databases - by kenjis - 02-03-2023, 12:44 AM
|