raaden
raaden
DTDrizzle Team
Created by raaden on 9/4/2023 in #help
PostgresError: unrecognized configuration parameter "schema" when creating client for postgres-js
If I am reading the error correctly Postgres is not wanting the schema parameter in there.
I made a minimal repo with the exact same code and it is working fine, so it must be an issue somewhere else that is causing a posgres library conflict? Not sure, but I'm going to try to rebuild the client from scratch and see if it clears. Thanks for the reply and will let you know if I still have an issue.
22 replies
DTDrizzle Team
Created by raaden on 9/4/2023 in #help
PostgresError: unrecognized configuration parameter "schema" when creating client for postgres-js
If it helps... modifying same code to node-postgres works fine.
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';

export const pool = new Pool({
connectionString: appEnv.DATABASE_URL,
});

export const dbClient = drizzle(pool, { schema: dbSchema });
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';

export const pool = new Pool({
connectionString: appEnv.DATABASE_URL,
});

export const dbClient = drizzle(pool, { schema: dbSchema });
22 replies
DTDrizzle Team
Created by bombillazo on 5/21/2023 in #help
Introspection error with pg
I saw this as well. The --config option does not seem to be there so it might just be that reading configuration files is not fully implemented in the introspect workflow quite yet. edit: or more likely the same as this: https://discord.com/channels/1043890932593987624/1109283674727399434/1109540736963186780 fix incoming 🙂
2 replies
DTDrizzle Team
Created by tmcw on 4/10/2023 in #help
drizzle-kit doesn't pull foreign keys from supabase/postgres?
Not sure if it is related but I am seeing that Primary Keys are not captured against a standard Pg database (not supabase) as well. So it might not be supabase specific. It captured them as notNull but did not define them as primary keys in either the generated sql or schema file.
3 replies