Squash and fix migrations so they run against an empty schema #24

Merged
tozh4728 merged 3 commits from empty-database-migration into develop 2024-12-02 10:31:21 +01:00

3 Commits

Author SHA1 Message Date
6adf26e9fa Merge branch 'develop' into empty-database-migration
All checks were successful
Build and test / build-and-test (push) Successful in 12m41s
2024-11-28 18:13:10 +01:00
6aa06ecc1d Squash all database migrations
All checks were successful
Build and test / build-and-test (push) Successful in 6m38s
There are migrations that do not work on an empty database (372) and many others that give deprecated warnings that will stop working in the future.

This change runs all the migrations (with a fixed 372) and then takes a dump of the result and uses that as a new baseline migration for Flyway. Baselines are meant for existing databases where Flyway is introduced so to fool Flyway into baselining we change the table Flyway uses from the old schema_version to the new flyway_schema_history (default).

The new baseline has no warnings and no invalid migrations and can be run on both empty databases and existing ones.

While Flyway has support for this type of a new baseline (or state scripts), that is only available in the paid editions and not the community version.
2024-11-21 23:01:04 +01:00
5476fc82ea Do not create duplicate templates
Was caused by a refactor that removed the credits used to differentiate project types while master and one-year master were the same. Now it is different types and the credits were no longer needed and got removed.
2024-11-21 22:55:52 +01:00