Migrations won't run
It might be because it's 2 AM, but I have been trying to change my project's structure now that it's growing bigger and bigger, and I decided to separate the schema into multiple files, so now I have
UserModel.ts
, ProjectModel.ts
, etc... Then I made a schema.ts
, where I tried this:
Which seemed to work because I got types, but whenever I run drizzle-kit generate:pg
, it shows me "0 tables", and nothing is created, I tried exporting default, just exporting them all, nothing seems to work, any ideas? Probably gonna go to bed and figure it out but it's been driving me insane for the past hour or so2 Replies
I think it's the spread operator that's messing you up here... I have a
schema.ts
file in my project that just looks like this:
And then my schemas look like this:
Hopefully you can compare that to your code and work backwards from there 🙂It was exactly that, it works now, thanks @wprk14!