3 Replies
A
.relation.schema
file can reference .schema
files like so:
But I never import a .relation.schema
file from a .schema
file, only the other way around
And this is the error I get when I run pnpm db:push
:
In my case, it happened with circular references.
Try moving your schema into one file, that solved the issue.
I tried that with no success 😦
This is the most likely cause but I tested my code with
madge
but it didn't find any circular dependency
What ended up working for me was moving every table & relation definition to one schema.ts file, and making sure to export var
everything
I tried running pnpm db:push with both export const
and export let
for every table
& relation
but those would always crash
Not the best solution for my project but I just finished refactoring so the app doesn't crash anymore...