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
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