maksym36ua
maksym36ua
Explore posts from servers
DTDrizzle Team
Created by maksym36ua on 4/25/2025 in #help
pushSchema from drizzle-kit/api is not working if pgSchema specified in the schema.ts file
Hey, I'm trying to apply migration file to a custom schema using this approach (https://orm.drizzle.team/docs/schemas). If I'll specify pgSchema in schema.ts file the pushSchema still tries to apply to the default public schema ignoring the pgSchema declaration: my schema.ts:
export const schema = pgSchema('custom_schema_name');

export const users = schema.table('users', {
id: serial('id').primaryKey(),
email: varchar('email', { length: 255 }).notNull().unique(),
password: varchar('password', { length: 255 }),
});
export const schema = pgSchema('custom_schema_name');

export const users = schema.table('users', {
id: serial('id').primaryKey(),
email: varchar('email', { length: 255 }).notNull().unique(),
password: varchar('password', { length: 255 }),
});
my db.service.ts:
import { pushSchema } from "drizzle-kit/api";
import * as schema from '../schemas/schema';
...

const db = drizzle(this.configService.get<string>('DATABASE_URL')!)
const result = await pushSchema(schema, db as unknown as PgDatabase<never>);
await result.apply();
import { pushSchema } from "drizzle-kit/api";
import * as schema from '../schemas/schema';
...

const db = drizzle(this.configService.get<string>('DATABASE_URL')!)
const result = await pushSchema(schema, db as unknown as PgDatabase<never>);
await result.apply();
This resulst in a conflict because pushSchema tries to apply the schema.ts file to the public schema instead of pgSchema specified in the file. Am I doing something wrong?
1 replies
WWasp
Created by maksym36ua on 1/24/2025 in #🙋questions
Issue with Google Redirect URL while migrating 0.12.4 -> 0.13.0
No description
11 replies
WWasp
Created by maksym36ua on 2/7/2024 in #🙋questions
OpenSaas Blog deployment
Hey folks, what's the best way to deploy blog for OpenSaas? From what I see - it's a totally separate app that should be hosted elsewhere. Any guides on this?
28 replies
WWasp
Created by maksym36ua on 11/8/2023 in #🙋questions
How to include a custom file in the project?
Hey, I need to store a custom .json file in the "server" folder of the Wasp project, what's the correct way to do it? The file is being ignored by the compiler and not present in .wasp folder
5 replies
WWasp
Created by maksym36ua on 9/6/2023 in #🙋questions
Wasp logs are partially displayed
No description
15 replies
WWasp
Created by maksym36ua on 6/21/2023 in #🙋questions
Custom favicon.ico
No description
12 replies
WWasp
Created by maksym36ua on 6/15/2023 in #🙋questions
Google Auth callback URL gets called twice
No description
11 replies