sublinks / sublinks-api

MIT License
68 stars 17 forks source link

Upgrade Flyway #372

Closed lazyguru closed 2 months ago

lazyguru commented 2 months ago

Now that we have swapped to Postgres, Flyway needs to be upgraded (or replaced with something else? Or ... something):

Flyway upgrade recommended: PostgreSQL 16.2 is newer than this version of Flyway and support has not been tested. The latest supported version of PostgreSQL is 15

NOTE: This does not seem to actually cause any issues with migrations that I can see though:

api-1  | 2024-04-30T05:53:37.441Z  INFO 1 --- [           main] o.f.c.i.s.JdbcTableSchemaHistory         : Schema history table "backend"."schema_version" does not exist yet
api-1  | 2024-04-30T05:53:37.446Z  INFO 1 --- [           main] o.f.core.internal.command.DbValidate     : Successfully validated 5 migrations (execution time 00:00.034s)
api-1  | 2024-04-30T05:53:37.462Z  INFO 1 --- [           main] o.f.c.i.s.JdbcTableSchemaHistory         : Creating Schema History table "backend"."schema_version" ...
api-1  | 2024-04-30T05:53:37.567Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Current version of schema "backend": << Empty Schema >>
api-1  | 2024-04-30T05:53:37.646Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "backend" to version "20231003 - Create initial entity tables"
api-1  | 2024-04-30T05:53:37.958Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "backend" to version "20231004 - Create aggregate tables"
api-1  | 2024-04-30T05:53:38.086Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "backend" to version "20231005 - Insert languages"
api-1  | 2024-04-30T05:53:38.224Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "backend" to version "20231006 - Create foreign key references"
api-1  | 2024-04-30T05:53:38.310Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "backend" to version "20231007 - Insert first instance record"
api-1  | 2024-04-30T05:53:38.326Z  INFO 1 --- [           main] o.f.core.internal.command.DbMigrate      : Successfully applied 5 migrations to schema "backend", now at version v20231007 (execution time 00:00.488s)
jgrim commented 2 months ago

I don't believe flyway supports 16 yet. We are running latest.

lazyguru commented 2 months ago

Then shouldn't we downgrade Postgres to a version supported by Flyway? I don't think we should just ignore an error/warning

jgrim commented 2 months ago

There are very few differences between 16 & 15 so it's not an issue.