Dominick
04/28/2021, 4:02 AMval dataSource = HikariDataSource().apply {
maximumPoolSize = 20
driverClassName = "com.mysql.jdbc.Driver"
jdbcUrl = File("jdbc_url.txt").readText()
isAutoCommit = false
}
Database.Companion.connect(dataSource)
transaction {
SchemaUtils.create(MediaPropertiesTable)
SchemaUtils.create(MediaContentTable)
SchemaUtils.create(UserAPIKeysTable)
SchemaUtils.create(UserTable)
}
The file jdbc_url.txt does exist and has a connection url generated from pterodactyl
UPDATE: Tried removing pterodactyl from the equation and still doesnt work. It gets past the create code and all, nothing gets logged even after adding addLogger(StdOutSqlLogger)
and the tables arent in the db.Bogdan
04/28/2021, 2:36 PMautoCommit = false
, try like this:
transaction {
// create
commit ()
}
the query is displayed in the log?Bogdan
04/28/2021, 2:40 PMjdbc_url.txt
- are you sure the URL is correct?Bogdan
04/28/2021, 2:42 PMtapac
04/28/2021, 7:28 PMDominick
04/29/2021, 9:34 AM