mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Fix flyway dumbness
This commit is contained in:
1 parent
b8e2f27371
commit
493f4cfec3
6 files changed
+11
-9
No files matched your search
@@ -165,6 +165,7 @@ public final class MySQLUserManager extends DatabaseUserManager {
|
||||
.baselineOnMigrate(true)
|
||||
.locations("queries/migrations/mysql")
|
||||
.dataSource(dataSource)
|
||||
.validateMigrationNaming(true)
|
||||
.validateOnMigrate(true)
|
||||
.load();
|
||||
|
||||
|
||||
+3
-1
@@ -47,6 +47,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.flywaydb.core.internal.database.postgresql.PostgreSQLDatabaseType;
|
||||
import org.flywaydb.core.internal.plugin.PluginRegister;
|
||||
import org.jdbi.v3.core.Jdbi;
|
||||
import org.jdbi.v3.core.statement.Update;
|
||||
import org.jdbi.v3.postgres.PostgresPlugin;
|
||||
@@ -150,7 +151,7 @@ public final class PostgreSQLUserManager extends DatabaseUserManager {
|
||||
public PostgreSQLUserManager create() {
|
||||
try {
|
||||
Class.forName("org.postgresql.Driver");
|
||||
Flyway.configure().getPluginRegister().REGISTERED_PLUGINS.add(new PostgreSQLDatabaseType());
|
||||
PluginRegister.REGISTERED_PLUGINS.add(new PostgreSQLDatabaseType());
|
||||
} catch (final Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
@@ -169,6 +170,7 @@ public final class PostgreSQLUserManager extends DatabaseUserManager {
|
||||
.baselineOnMigrate(true)
|
||||
.locations("queries/migrations/postgresql")
|
||||
.dataSource(dataSource)
|
||||
.validateMigrationNaming(true)
|
||||
.validateOnMigrate(true)
|
||||
.load()
|
||||
.migrate();
|
||||
|
||||
Reference in new issue
Block a user