mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +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();
|
||||
|
||||
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS carbon_users (
|
||||
spying BOOLEAN
|
||||
);
|
||||
|
||||
CREATE TABLE carbon_ignores (
|
||||
CREATE TABLE IF NOT EXISTS carbon_ignores (
|
||||
id uuid NOT NULL,
|
||||
ignoredplayer uuid NOT NULL,
|
||||
PRIMARY KEY (id, ignoredplayer)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CREATE TABLE carbon_leftchannels (
|
||||
CREATE TABLE IF NOT EXISTS carbon_leftchannels (
|
||||
id uuid NOT NULL,
|
||||
channel varchar(100) NOT NULL,
|
||||
PRIMARY KEY (id, channel)
|
||||
|
||||
Reference in new issue
Block a user