Open abhi2495 opened 4 years ago
Seems like the library has the following logic : For a file named like V1__xxxxxx.sql , during migration, it parses the version , which is 1 here and checks in migrations table whether the record with id=1 is present. If it's there, it does nothing, else executes the script.
Thus even if we rename the file after __ (double underscore) keeping the version same, or change it's content, it simply ignores.
yes.
I think actually there are two issues:
If any changes are made to an already migrated sql script file and run again, there are no logs ( neither error / nor any info) for this. Seems like the library has the following logic : For a file named like
V1__xxxxxx.sql
, during migration, it parses the version , which is 1 here and checks inmigrations
table whether the record withid=1
is present. If it's there, it does nothing, else executes the script.Thus even if we rename the file after
__
(double underscore) keeping the version same, or change it's content, it simply ignores.This behaviour is quite different from Flyway where checksum computation happens for every script.
Another probable missing feature:
For a multi-tenant microservice, if we choose schema-per-tenant approach (i.e same database server, different schemas for different tenants), then using this library how are we supposed to run migration scripts (creating the tables etc ) for every schema during application startup ? If I am not wrong, the
ConnectionFactory
requires mentioning schema.