mysql {
  class-name = "vinyldns.mysql.repository.MySqlDataStoreProvider"

  settings {
    # JDBC Settings, these are all values in scalikejdbc-config, not our own
    # these must be overridden to use MYSQL for production use
    # assumes a docker or mysql instance running locally
    name = "vinyldns"
    name = ${?DATABASE_NAME}
    driver = "org.mariadb.jdbc.Driver"
    driver = ${?JDBC_DRIVER}
    migration-url = "jdbc:mariadb://localhost:19002/?user=root&password=pass"
    migration-url = ${?JDBC_MIGRATION_URL}
    url = "jdbc:mariadb://localhost:19002/vinyldns?user=root&password=pass"
    url = ${?JDBC_URL}
    user = "root"
    user = ${?JDBC_USER}
    password = "pass"
    password = ${?JDBC_PASSWORD}
    flyway-out-of-order = false
    flyway-out-of-order = ${?FLYWAY_OUT_OF_ORDER}

    # see https://github.com/brettwooldridge/HikariCP
    connection-timeout-millis = 1000
    idle-timeout = 10000
    max-lifetime = 30000
    maximum-pool-size = 5
    minimum-idle = 0

    my-sql-properties = {
      cachePrepStmts=true
      prepStmtCacheSize=250
      prepStmtCacheSqlLimit=2048
      rewriteBatchedStatements=true
    }
  }

  repositories {
    batch-change {}
    zone {}
  }
}
