arush
Explore posts from serversDTDrizzle Team
•Created by arush on 3/8/2024 in #help
drizzle-studio doesn't see pgView materialized views
I have existing materialized views and marked as such in my schema, but drizzle studio doesn't see them. the drizzle studio schema seems to have left them out when being generated
here is the relevant part of my schema that drizzle studio leaves out
export const claimsView = pgView("claims_view", {
customerCode: varchar("customer_code", { length: 8 }).notNull(),
totalPetitionValue: numeric("total_petition_value"),
totalPetitionValueCurrency: text("total_petition_value").notNull(),
totalLatestValue: numeric("total_latest_value"),
totalLatestValueCurrency: text("total_latest_value").notNull(),
}).existing(); // existing() tells drizzle that this view already exists in the db
export const claimAssetsView = pgView("claim_assets_view", {
customerCode: varchar("customer_code", { length: 8 }).notNull(),
name: text("name").notNull(),
type: text("type").notNull(),
balance: numeric("balance").notNull(),
usdPetition: numeric("usd_petition"),
usdPetitionCurrency: text("usd_petition").notNull(),
usdLatest: numeric("usd_latest"),
usdLatestCurrency: text("usd_latest").notNull(),
}).existing(); // existing() tells drizzle that this view already exists in the db
7 replies
TTCTheo's Typesafe Cult
•Created by arush on 3/1/2024 in #questions
seemingly random pnpm i error due to lockfile (during railway deploy)
Every so often my pnpm lockfile goes out of sync with pnpm lockfile and I get the following error
ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json
#10 1.079
#10 1.079 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
Is this because I’m using bun locally and not pnpm? How to fix?
2 replies
DTDrizzle Team
•Created by arush on 2/29/2024 in #help
push keeps wanting to truncate my existing table data
As i develop locally i often want to push a db change with push:pg and instead of just updating the change it wants to recreate thew whole db and delete all content! how can i get it to just do an incremental migration?
7 replies