Setting up db migrations
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import {
|
||||
DummyDriver,
|
||||
PostgresAdapter,
|
||||
PostgresIntrospector,
|
||||
PostgresQueryCompiler,
|
||||
} from 'kysely'
|
||||
import { defineConfig } from 'kysely-ctl'
|
||||
|
||||
export default defineConfig({
|
||||
dialect: {
|
||||
createAdapter() {
|
||||
return new PostgresAdapter()
|
||||
},
|
||||
createDriver() {
|
||||
return new DummyDriver()
|
||||
},
|
||||
createIntrospector(db) {
|
||||
return new PostgresIntrospector(db)
|
||||
},
|
||||
createQueryCompiler() {
|
||||
return new PostgresQueryCompiler()
|
||||
},
|
||||
},
|
||||
migrations: {
|
||||
migrationFolder: "src/database/migrations",
|
||||
},
|
||||
// plugins: [],
|
||||
// seeds: {
|
||||
// seedFolder: "seeds",
|
||||
// }
|
||||
})
|
||||
Reference in New Issue
Block a user