/** * Return the migration version (typically FlywayDb compatible). * <p> * Example: 1.1.1_2 * <p> * The version is expected to be the combination of the current pom version plus * a 'feature' id. The combined version must be unique and ordered to work with * FlywayDb so each developer sets a unique version so that the migration script * generated is unique (typically just prior to being submitted as a merge request). */ public String getVersion() { String envVersion = readEnvironment("ddl.migration.version"); if (!isEmpty(envVersion)) { return envVersion.trim(); } return version; }
/** * Return the migration name which is short description text that can be appended to * the migration version to become the ddl script file name. * <p> * So if the name is "a foo table" then the ddl script file could be: * "1.1.1_2__a-foo-table.sql" * </p> * <p> * When the DB migration relates to a git feature (merge request) then this description text * is a short description of the feature. * </p> */ public String getName() { String envName = readEnvironment("ddl.migration.name"); if (!isEmpty(envName)) { return envName.trim(); } return name; }