Change database driver to MySQL
This commit is contained in:
parent
cdc7d797ea
commit
93c5431c0f
2 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@ dependencies {
|
||||||
implementation("org.jetbrains.exposed:exposed-dao:$exposed_version")
|
implementation("org.jetbrains.exposed:exposed-dao:$exposed_version")
|
||||||
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version")
|
implementation("org.jetbrains.exposed:exposed-jdbc:$exposed_version")
|
||||||
implementation("org.jetbrains.exposed:exposed-java-time:$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("org.flywaydb:flyway-core:9.22.2")
|
||||||
implementation("io.ktor:ktor-server-auth-jvm:2.3.4")
|
implementation("io.ktor:ktor-server-auth-jvm:2.3.4")
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@ import org.jetbrains.exposed.sql.transactions.transaction
|
||||||
object DatabaseFactory {
|
object DatabaseFactory {
|
||||||
fun init() {
|
fun init() {
|
||||||
val host = System.getenv("DB_HOST")
|
val host = System.getenv("DB_HOST")
|
||||||
val user = "postgres"
|
val user = "mysql"
|
||||||
val password = "postgres"
|
val password = "mysql"
|
||||||
val database = Database.connect(
|
val database = Database.connect(
|
||||||
url = "jdbc:postgresql://$host:5432/schools",
|
url = "jdbc:mysql://$host:3306/schools",
|
||||||
driver = "org.postgresql.Driver",
|
driver = "com.mysql.cj.jdbc.Driver",
|
||||||
user = user,
|
user = user,
|
||||||
password = password,
|
password = password,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue