18:41:46 [main] WARN JdbcTemplate - DB: Cannot add foreign key constraint (SQL
State: HY000 - Error Code: 1215)
18:41:46 [main] ERROR DbMigrate - Migration of schema `1` to version 1.1 - Add c
haracter tables failed! Please restore backups and roll back database and code!
Exception in thread "main" org.flywaydb.core.internal.dbsupport.FlywaySqlScriptE
xception:
Migration V1_1__Add_character_tables.sql failed
-----------------------------------------------
SQL State : HY000
Error Code : 1215
Message : Cannot add foreign key constraint
Location : sql/V1_1__Add_character_tables.sql (D:\classika\gameserver\sql\V1_1
__Add_character_tables.sql)
Line : 68
Statement : CREATE TABLE `character_mail` (
`char_id` int(11) NOT NULL,
`message_id` int(11) NOT NULL,
`is_sender` tinyint(1) NOT NULL,
PRIMARY KEY (`char_id`,`message_id`),
KEY `message_id` (`message_id`),
FOREIGN KEY (`message_id`) REFERENCES `mail` (`message_id`) ON DELETE CASCADE
) ENGINE=InnoDB
at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java
:117)
at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(
SqlMigrationExecutor.java:71)
at org.flywaydb.core.internal.command.DbMigrate.doMigrate(DbMigrate.java
:352)
at org.flywaydb.core.internal.command.DbMigrate.access$1100(DbMigrate.ja
va:47)
at org.flywaydb.core.internal.command.DbMigrate$4.doInTransaction(DbMigr
ate.java:308)
at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(Tran
sactionTemplate.java:72)
at org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate
.java:305)
at org.flywaydb.core.internal.command.DbMigrate.access$1000(DbMigrate.ja
va:47)
at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigr
ate.java:230)
at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigr
ate.java:173)
at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(Tran
sactionTemplate.java:72)
at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:1
73)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:959)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:917)
at org.flywaydb.core.Flyway.execute(Flyway.java:1361)
at org.flywaydb.core.Flyway.migrate(Flyway.java:917)
at org.mmocore.commons.database.installer.DatabaseInstaller.start(Databa
seInstaller.java:26)
at org.mmocore.gameserver.GameServer.<init>(GameServer.java:129)
at org.mmocore.gameserver.GameServer.main(GameServer.java:324)
Caused by: java.sql.SQLException: Cannot add foreign key constraint
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatem
ent.java)
at org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement(Jd
bcTemplate.java:238)
at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java
:114)
... 18 more
Логин сервер
18:41:00 [HikariPool-1 housekeeper] WARN ProxyLeakTask - Connection leak detect
ion triggered for com.mysql.jdbc.JDBC4Connection@594a11, stack trace follows
java.lang.Exception: Apparent connection leak detected
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUti
ls.java:50)
at org.flywaydb.core.Flyway.execute(Flyway.java:1314)
at org.flywaydb.core.Flyway.migrate(Flyway.java:917)
at org.mmocore.commons.database.installer.DatabaseInstaller.start(Databa
seInstaller.java:26)
at org.mmocore.authserver.AuthServer.<init>(AuthServer.java:35)
at org.mmocore.authserver.AuthServer.main(AuthServer.java:96)
18:41:00 [HikariPool-1 housekeeper] WARN ProxyLeakTask - Connection leak detect
ion triggered for com.mysql.jdbc.JDBC4Connection@1ad2aa7, stack trace follows
java.lang.Exception: Apparent connection leak detected
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUti
ls.java:50)
at org.flywaydb.core.Flyway.execute(Flyway.java:1315)
at org.flywaydb.core.Flyway.migrate(Flyway.java:917)
at org.mmocore.commons.database.installer.DatabaseInstaller.start(Databa
seInstaller.java:26)
at org.mmocore.authserver.AuthServer.<init>(AuthServer.java:35)
at org.mmocore.authserver.AuthServer.main(AuthServer.java:96)
18:41:00 [main] INFO DbMigrate - Successfully applied 1 migration to schema `1`
(execution time 00:03.357s).