[BUG]: Creating a Materialized View that depends on another fails because of creation order #4520
Open
1 task done
Labels
bug
Something isn't working
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.43.1
What version of
drizzle-kit
are you using?0.31.1
Other packages
No response
Describe the Bug
When creating a materialized view that depends on another, the first pushed MV is the one that depends on the other, resulting in error code
42P01
:error: relation "x" does not exist
.On my files i have the following MVs:
And then it gets exported to an index file with the rest of schemas like:
The issue happens when I do a push:
As it can be seen it tries to first create the dependant MV, using generate will give the same result:
Giving error code
42P01
once again and the following log:I don't know if there is a way of handling this, but at least i have found no way of doing it. Changing the names on the MVs seem to not help and moving them in the exports either.
Thanks for the help in advance, if any more information is needed i will be happy to provide it.
The text was updated successfully, but these errors were encountered: