nicolastamalu
nicolastamalu
Explore posts from servers
DTDrizzle Team
Created by nicolastamalu on 2/1/2024 in #help
disable migrate logs
I'm running the following script to run migrations:
import { DrizzleConfig } from 'drizzle-orm'
import { drizzle } from 'drizzle-orm/postgres-js'
import { migrate } from 'drizzle-orm/postgres-js/migrator'
import postgres from 'postgres'

export async function runMigrations(
postgresDbUrl: string,
config?: DrizzleConfig,
) {
const sql = postgres(postgresDbUrl, { max: 1 })
const db = drizzle(sql, config)
await migrate(db, { migrationsFolder: 'drizzle/migrations' })
await sql.end()
}
import { DrizzleConfig } from 'drizzle-orm'
import { drizzle } from 'drizzle-orm/postgres-js'
import { migrate } from 'drizzle-orm/postgres-js/migrator'
import postgres from 'postgres'

export async function runMigrations(
postgresDbUrl: string,
config?: DrizzleConfig,
) {
const sql = postgres(postgresDbUrl, { max: 1 })
const db = drizzle(sql, config)
await migrate(db, { migrationsFolder: 'drizzle/migrations' })
await sql.end()
}
Im having a lot of logs like this:
{
severity_local: 'NOTICE',
severity: 'NOTICE',
code: '42622',
message: 'identifier "intraday_breathing_rates_breathing_rate_id_breathing_rates_id_fk" will be truncated to
"intraday_breathing_rates_breathing_rate_id_breathing_rates_id_f"',
where: 'compilation of PL/pgSQL function "inline_code_block" near line 1',
file: 'scansup.c',
line: '99',
routine: 'truncate_identifier'
}
{
severity_local: 'NOTICE',
severity: 'NOTICE',
code: '42622',
message: 'identifier "intraday_breathing_rates_breathing_rate_id_breathing_rates_id_fk" will be truncated to
"intraday_breathing_rates_breathing_rate_id_breathing_rates_id_f"',
where: 'compilation of PL/pgSQL function "inline_code_block" near line 1',
file: 'scansup.c',
line: '99',
routine: 'truncate_identifier'
}
Can I disable the logs somehow?
5 replies