I set the migration/20210405-update-datetime-columns.sql file up to use one ALTER per table, and removed the UPDATE statements because the conversion is actually accomplished during the table alteration.
I added some logic to scripts.py in the DatabaseMigrationScript class, aimed at running individual statements in a migration file within their own transactions. That only triggers if somewhere in the .sql file the string SIMPLYE_MIGRATION_TRANSACTION_PER_STATEMENT appears.
I don't have the circ manager set up locally in a way that makes this easy to test, so anything you spot would be good to know about before I build this and try it on QA.
I've changed two things:
migration/20210405-update-datetime-columns.sql
file up to use oneALTER
per table, and removed theUPDATE
statements because the conversion is actually accomplished during the table alteration.scripts.py
in theDatabaseMigrationScript
class, aimed at running individual statements in a migration file within their own transactions. That only triggers if somewhere in the .sql file the stringSIMPLYE_MIGRATION_TRANSACTION_PER_STATEMENT
appears.I don't have the circ manager set up locally in a way that makes this easy to test, so anything you spot would be good to know about before I build this and try it on QA.