drizzle-kit introspect creating schema views with pgTable #2943
hardysabs2
started this conversation in
General
Replies: 1 comment 1 reply
-
Just replace pgTable with pgView. Drizzle kit is confused by views and creates them as if they were tables. Materialized views are ignored altogether and need to be done by hand. I believe this will be resolved eventually as materialized views are on the roadmap. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I run drizzle-kit introspect the tables and views in my PostgreSQL database are both being created in schema.ts using pgTable.
I have amongst others
table - "company"
view - "Company"
The schema.ts has generated to it
export const company = pgTable("company", {...})
and
export const company = pgTable("Company", {...})
This has eslint errors and so will not compile.
I presume there may be some config I am missing. I am on
Any advice appreciated.
Beta Was this translation helpful? Give feedback.
All reactions