question/problem about new drizzle-seed

Hey, I was having a play around with the new drizzle-seed package with a project and couldn't seem to get it to work properly. I get no output on the console and as far as I can see using a debugger it ends up in a infinite loop on the method getOrderedTablesList() of the SeedService class. I have about 24 tables so nothing crazy in terms of requirements. Is there a requirement to define the "drizzle relations" for it to work? I removed all of those a while ago and have stuck to using the db.select() function for all queries as I find it easier. If so maybe this should be included in the docs. PS: I forgot to mention, the package looks great otherwise, good job!
2 Replies
michaelp7725
michaelp7725OP2w ago
I've been able to answer my own question, Yes it does require relations to be defined using the drizzle API (as opposed to in the db schema itself). maybe this could be mentioned somewhere in documention because without the relations being set, the process hangs and doesn't have any output.
Jack
Jack2w ago
I think as well it expects fully lowercase table names too which tripped me up otherwise it gives me this error: @scope/package: PostgresError: relation "public.tablename" does not exist To be honest though I should have probably used table_name instead of tableName
Want results from more Discord servers?
Add your server