diff --git a/build.gradle.kts b/build.gradle.kts index c60df7e..3fce63d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -46,7 +46,7 @@ dependencies { implementation("org.jetbrains.exposed:exposed-dao:$exposed_version") implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version") implementation("org.jetbrains.exposed:exposed-java-time:$exposed_version") - implementation("org.postgresql:postgresql:42.7.2") + implementation("mysql:mysql-connector-java:8.0.33") implementation("org.flywaydb:flyway-core:9.22.2") implementation("io.ktor:ktor-server-auth-jvm:2.3.4") diff --git a/src/main/kotlin/io/github/wulkanowy/schools/DatabaseFactory.kt b/src/main/kotlin/io/github/wulkanowy/schools/DatabaseFactory.kt index 4b5d7f7..a491d72 100644 --- a/src/main/kotlin/io/github/wulkanowy/schools/DatabaseFactory.kt +++ b/src/main/kotlin/io/github/wulkanowy/schools/DatabaseFactory.kt @@ -11,11 +11,11 @@ import org.jetbrains.exposed.sql.transactions.transaction object DatabaseFactory { fun init() { val host = System.getenv("DB_HOST") - val user = "postgres" - val password = "postgres" + val user = "mysql" + val password = "mysql" val database = Database.connect( - url = "jdbc:postgresql://$host:5432/schools", - driver = "org.postgresql.Driver", + url = "jdbc:mysql://$host:3306/schools", + driver = "com.mysql.cj.jdbc.Driver", user = user, password = password, )