25 lines
578 B
TypeScript
25 lines
578 B
TypeScript
|
import env from "#start/env.js"
|
||
|
import { defineConfig } from "@adonisjs/lucid"
|
||
|
|
||
|
const databaseConfig = defineConfig({
|
||
|
connection: "mysql",
|
||
|
connections: {
|
||
|
mysql: {
|
||
|
client: "mysql2",
|
||
|
connection: {
|
||
|
host: env.get("DATABASE_HOST"),
|
||
|
port: env.get("DATABASE_PORT"),
|
||
|
user: env.get("DATABASE_USER"),
|
||
|
password: env.get("DATABASE_PASSWORD"),
|
||
|
database: env.get("DATABASE_NAME"),
|
||
|
},
|
||
|
migrations: {
|
||
|
naturalSort: true,
|
||
|
paths: ["database/migrations"],
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
|
||
|
export default databaseConfig
|