Skip to content
Snippets Groups Projects
knexconfig.ts 1.11 KiB
Newer Older
import { env } from 'process';
import { join } from 'path';
import { parse } from 'pg-connection-string';

const pgconfig: any = parse(env.DATABASE_URL ?? 'postgresql://postgres@localhost/ryoko');
export default {
    development: {
        client: "sqlite3",
        connection: {
            filename: "./dev.sqlite3",
        },
        migrations: {
            tableName: "knex_migrations",
            directory: join(__dirname, 'migrations'),
        },
            tableName: "knex_migrations",
            directory: join(__dirname, 'migrations'),
        },
    },
    production: {
        client: "postgresql",
            tableName: "knex_migrations",
            directory: join(__dirname, 'migrations'),
        },