mscholz.dev
mscholz.dev
DTDrizzle Team
Created by mscholz.dev on 2/4/2024 in #help
Studio
Hello, i'm testing using drizzle with fastify in a docker and postgres, i complete a request but my studio is running infinitely, i don't know why
import type { Config } from 'drizzle-kit';

export default {
// schema: './src/db/schemas/*.ts',
// out: './src/db/migrations'
driver: 'pg',
dbCredentials: {
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
},
verbose: true,
out: './src/db/migrations',
schema: './src/db/schemas.ts'
} satisfies Config;
import type { Config } from 'drizzle-kit';

export default {
// schema: './src/db/schemas/*.ts',
// out: './src/db/migrations'
driver: 'pg',
dbCredentials: {
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
},
verbose: true,
out: './src/db/migrations',
schema: './src/db/schemas.ts'
} satisfies Config;
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';
import * as schema from '@db/schemas';

const pool = new Pool({
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
});

export const db = drizzle(pool, { logger: true, schema });
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';
import * as schema from '@db/schemas';

const pool = new Pool({
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
});

export const db = drizzle(pool, { logger: true, schema });
8 replies