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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -39,8 +39,8 @@ versions:
|
||||
discordsrv: 1.26.0
|
||||
jdbi: 3.34.0
|
||||
hikari: 5.0.1
|
||||
mysql: 8.0.30
|
||||
flyway: 9.4.0
|
||||
mysql: 8.0.31
|
||||
flyway: 8.5.13 # DO NOT UPDATE. Something will break.
|
||||
caffeine: 3.0.5
|
||||
mariadb: 3.0.8
|
||||
messenger: 1.0.0-SNAPSHOT
|
||||
@@ -216,7 +216,7 @@ dependencies:
|
||||
name: flyway-mysql
|
||||
version: { ref: flyway }
|
||||
mysql:
|
||||
group: mysql
|
||||
group: com.mysql
|
||||
name: mysql-connector-j
|
||||
version: { ref: mysql }
|
||||
postgresql:
|
||||
|
||||
@@ -130,7 +130,6 @@ public final class CarbonChatPaper extends CarbonChatInternal<CarbonPlayerPaper>
|
||||
.groupId("com.github.luben")
|
||||
.artifactId("zstd-jni")
|
||||
.version("1.5.1-1")
|
||||
.relocate("com.github.luben", "net.draycia.carbon.libs.com.github.luben")
|
||||
.build();
|
||||
|
||||
libraryManager.loadLibrary(messenger);
|
||||
@@ -154,10 +153,10 @@ public final class CarbonChatPaper extends CarbonChatInternal<CarbonPlayerPaper>
|
||||
libraryManager.loadLibrary(protobuf);
|
||||
|
||||
final Library mysqlConnector = Library.builder()
|
||||
.groupId("mysql")
|
||||
.groupId("com.mysql")
|
||||
.artifactId("mysql-connector-j")
|
||||
.version("8.0.31")
|
||||
.relocate("mysql-connector-j", "net.draycia.carbon.libs.mysql")
|
||||
//.relocate("mysql-connector-j", "net.draycia.carbon.libs.mysql")
|
||||
.build();
|
||||
|
||||
libraryManager.loadLibrary(mysqlConnector);
|
||||
|
||||
Reference in new issue
Block a user