doctrine / migrations

Doctrine Database Migrations Library
https://www.doctrine-project.org/projects/migrations.html
MIT License
4.68k stars 385 forks source link

Insert/delete sql queries for metadata table during dry-run and write-sql #1265

Closed wiistriker closed 2 years ago

wiistriker commented 2 years ago

Db user in my app doesn't have CREATE, ALTER query permissions so i cant run my migrations from php. Instead of this i write all necessary sql queries to file and run it from another user. After upgrading doctrine migrations to newer version i faced with issue, that resulted sql file doesnt contain insert/delete queries for meta table (doctrine_migration_versions). Very frustrating to insert this information myself so i ended up with this solution.

Such issue already been described in https://github.com/doctrine/migrations/issues/1082

Q A
Type improvement
BC Break no
Fixed issues 1082

Summary

I am not sure about TableMetadataStorage::complete method. I see you using Connection::insert, Connection::delete methods. It seems like we need to replace it with Connection::execute and use already generated queries

wiistriker commented 2 years ago

any news on this?

wiistriker commented 2 years ago

any news on this?

greg0ire commented 2 years ago

No reviews… I should have some time to merge and release this this afternoon.

wiistriker commented 2 years ago

Is there any options to have this changes in 3.0 version?

greg0ire commented 2 years ago

Is there any options to have this changes in 3.0 version?

Nope, sorry.