Having trouble with drizzle-kit pull -- is there a way to generate schema without relations?
I'm taking a 'database-first' approach. I have an existing Postgresql database with over 150 tables. I'd like to use the generated schema provided by drizzle-kit pull. However, I'm having a couple of issues with this approach - specifically i have a circular reference between two tables (An employee belongs to a department, and a deparmtent has an employee assigned to it as department owner, for example).
This causes a TS error in the generated schema. If I delete out the "foreignKey" parts of one of the tables, that resolves it.
Does anyone know how to get around this? I don't even need the generated relations since I plan to use the select syntax -- I'd be fine with just generating the models of the tables themselves without relations. I can't find any documentation on drizzle-kit though to generate just the tables
1 Reply
Same problem, I made a script to clean up the schemas files for unspected relations