Pipriles
Pipriles
Explore posts from servers
DTDrizzle Team
Created by Pipriles on 7/11/2023 in #help
Use a different schema on postgres
Update: You can define a custom schema like this
import { timestamp, text, jsonb, uuid, pgSchema } from 'drizzle-orm/pg-core';

export const sandbox = pgSchema("sandbox")

export const rollupAccountResponsesDaily = sandbox.table('rollup_account_responses_daily', {
rollupDate: timestamp('rollup_date', { withTimezone: true }),
accountId: uuid('account_id'),
questionId: text('question_id'),
source: text('source'),
msa: text('msa'),
response: text('response'),
metrics: jsonb('metrics'),
createdAt: timestamp('created_at', { withTimezone: true }),
updatedAt: timestamp('updated_at', { withTimezone: true }),
});
import { timestamp, text, jsonb, uuid, pgSchema } from 'drizzle-orm/pg-core';

export const sandbox = pgSchema("sandbox")

export const rollupAccountResponsesDaily = sandbox.table('rollup_account_responses_daily', {
rollupDate: timestamp('rollup_date', { withTimezone: true }),
accountId: uuid('account_id'),
questionId: text('question_id'),
source: text('source'),
msa: text('msa'),
response: text('response'),
metrics: jsonb('metrics'),
createdAt: timestamp('created_at', { withTimezone: true }),
updatedAt: timestamp('updated_at', { withTimezone: true }),
});
2 replies