Open JakeCapra opened 6 months ago
Note that this appears to impact all views (it's not specific to materialized views) - playground. I've hit this where one migration script renames a view, and then the subsequent one attempts to drop it (with the new name).
Tested with v1.26.0
Version
1.22.0
What happened?
I have to update the query that backs a materialized view.
To do this, I create a new temporary materialized view,
view_2
, drop the old view,view_1
, and rename the temporary view to the old view's name.I am renaming the temporary view using
alter materialized view view_2 rename to view_1
.When I run
sqlc generate
, SQLC states that theview_1
does not exist, when in fact it does, it's just been renamed.For context, I need to create a temporary materialized view, as dropping and recreating a materialized view will block all reads to the view. This is a two-step process, done in separate migrations. Postgres does not support updating a materialized view's query.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/f5ae38a7ec5718c27c64bbc03eccf3f118b68bfdf5d163a3f9caa4296cdfe5bb
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go