mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 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)
|
.baselineOnMigrate(true)
|
||||||
.locations("queries/migrations/mysql")
|
.locations("queries/migrations/mysql")
|
||||||
.dataSource(dataSource)
|
.dataSource(dataSource)
|
||||||
|
.validateMigrationNaming(true)
|
||||||
.validateOnMigrate(true)
|
.validateOnMigrate(true)
|
||||||
.load();
|
.load();
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -47,6 +47,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||||
import org.flywaydb.core.Flyway;
|
import org.flywaydb.core.Flyway;
|
||||||
import org.flywaydb.core.internal.database.postgresql.PostgreSQLDatabaseType;
|
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.Jdbi;
|
||||||
import org.jdbi.v3.core.statement.Update;
|
import org.jdbi.v3.core.statement.Update;
|
||||||
import org.jdbi.v3.postgres.PostgresPlugin;
|
import org.jdbi.v3.postgres.PostgresPlugin;
|
||||||
@@ -150,7 +151,7 @@ public final class PostgreSQLUserManager extends DatabaseUserManager {
|
|||||||
public PostgreSQLUserManager create() {
|
public PostgreSQLUserManager create() {
|
||||||
try {
|
try {
|
||||||
Class.forName("org.postgresql.Driver");
|
Class.forName("org.postgresql.Driver");
|
||||||
Flyway.configure().getPluginRegister().REGISTERED_PLUGINS.add(new PostgreSQLDatabaseType());
|
PluginRegister.REGISTERED_PLUGINS.add(new PostgreSQLDatabaseType());
|
||||||
} catch (final Exception exception) {
|
} catch (final Exception exception) {
|
||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -169,6 +170,7 @@ public final class PostgreSQLUserManager extends DatabaseUserManager {
|
|||||||
.baselineOnMigrate(true)
|
.baselineOnMigrate(true)
|
||||||
.locations("queries/migrations/postgresql")
|
.locations("queries/migrations/postgresql")
|
||||||
.dataSource(dataSource)
|
.dataSource(dataSource)
|
||||||
|
.validateMigrationNaming(true)
|
||||||
.validateOnMigrate(true)
|
.validateOnMigrate(true)
|
||||||
.load()
|
.load()
|
||||||
.migrate();
|
.migrate();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS carbon_users (
|
|||||||
spying BOOLEAN
|
spying BOOLEAN
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE carbon_ignores (
|
CREATE TABLE IF NOT EXISTS carbon_ignores (
|
||||||
id uuid NOT NULL,
|
id uuid NOT NULL,
|
||||||
ignoredplayer uuid NOT NULL,
|
ignoredplayer uuid NOT NULL,
|
||||||
PRIMARY KEY (id, ignoredplayer)
|
PRIMARY KEY (id, ignoredplayer)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
CREATE TABLE carbon_leftchannels (
|
CREATE TABLE IF NOT EXISTS carbon_leftchannels (
|
||||||
id uuid NOT NULL,
|
id uuid NOT NULL,
|
||||||
channel varchar(100) NOT NULL,
|
channel varchar(100) NOT NULL,
|
||||||
PRIMARY KEY (id, channel)
|
PRIMARY KEY (id, channel)
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ versions:
|
|||||||
discordsrv: 1.26.0
|
discordsrv: 1.26.0
|
||||||
jdbi: 3.34.0
|
jdbi: 3.34.0
|
||||||
hikari: 5.0.1
|
hikari: 5.0.1
|
||||||
mysql: 8.0.30
|
mysql: 8.0.31
|
||||||
flyway: 9.4.0
|
flyway: 8.5.13 # DO NOT UPDATE. Something will break.
|
||||||
caffeine: 3.0.5
|
caffeine: 3.0.5
|
||||||
mariadb: 3.0.8
|
mariadb: 3.0.8
|
||||||
messenger: 1.0.0-SNAPSHOT
|
messenger: 1.0.0-SNAPSHOT
|
||||||
@@ -216,7 +216,7 @@ dependencies:
|
|||||||
name: flyway-mysql
|
name: flyway-mysql
|
||||||
version: { ref: flyway }
|
version: { ref: flyway }
|
||||||
mysql:
|
mysql:
|
||||||
group: mysql
|
group: com.mysql
|
||||||
name: mysql-connector-j
|
name: mysql-connector-j
|
||||||
version: { ref: mysql }
|
version: { ref: mysql }
|
||||||
postgresql:
|
postgresql:
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ public final class CarbonChatPaper extends CarbonChatInternal<CarbonPlayerPaper>
|
|||||||
.groupId("com.github.luben")
|
.groupId("com.github.luben")
|
||||||
.artifactId("zstd-jni")
|
.artifactId("zstd-jni")
|
||||||
.version("1.5.1-1")
|
.version("1.5.1-1")
|
||||||
.relocate("com.github.luben", "net.draycia.carbon.libs.com.github.luben")
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
libraryManager.loadLibrary(messenger);
|
libraryManager.loadLibrary(messenger);
|
||||||
@@ -154,10 +153,10 @@ public final class CarbonChatPaper extends CarbonChatInternal<CarbonPlayerPaper>
|
|||||||
libraryManager.loadLibrary(protobuf);
|
libraryManager.loadLibrary(protobuf);
|
||||||
|
|
||||||
final Library mysqlConnector = Library.builder()
|
final Library mysqlConnector = Library.builder()
|
||||||
.groupId("mysql")
|
.groupId("com.mysql")
|
||||||
.artifactId("mysql-connector-j")
|
.artifactId("mysql-connector-j")
|
||||||
.version("8.0.31")
|
.version("8.0.31")
|
||||||
.relocate("mysql-connector-j", "net.draycia.carbon.libs.mysql")
|
//.relocate("mysql-connector-j", "net.draycia.carbon.libs.mysql")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
libraryManager.loadLibrary(mysqlConnector);
|
libraryManager.loadLibrary(mysqlConnector);
|
||||||
|
|||||||
Reference in new issue
Block a user