Welcome Guest, Not a member yet? Register   Sign In
Migrating Migrations Table from CI3 for existing databases
#8

(02-03-2023, 12:50 AM)kenjis Wrote:
(02-02-2023, 11:24 PM)objecttothis Wrote: It would be nicer if migrate recognized the version number from CI3 migrations and didn't try to run migrations before that.

If you don't need to go back to version 0 with migrations,
what if you just delete the migration files that were run on CI3?

This is an interesting idea. No, I don't think there is a need to revert once a migration has run.

I could programmatically:
- Check the CI3 version in the database.
- delete all migrations files to that point.
- drop the old table.
- Run CI4 migrations.

The only potential hiccup I can see is needing to have write access to that folder from the PID running php.
Reply


Messages In This Thread
RE: Migrating Migrations Table from CI3 for existing databases - by objecttothis - 02-03-2023, 12:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB