Skip to content

Conversation

kyleconroy
Copy link
Collaborator

Fixes #1519

@@ -236,7 +236,7 @@ func translate(node *nodes.Node) (ast.Node, error) {
n := inner.AlterObjectSchemaStmt
switch n.ObjectType {

case nodes.ObjectType_OBJECT_TABLE:
case nodes.ObjectType_OBJECT_TABLE, nodes.ObjectType_OBJECT_VIEW, nodes.ObjectType_OBJECT_MATVIEW:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally, the sqlc catalog stores views and materialized views as tables.

@kyleconroy kyleconroy merged commit f9bbfd9 into main Oct 13, 2023
@kyleconroy kyleconroy deleted the kyle/ddl-materialized-views-set-schema branch October 13, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Materialized Views don't support schema migrations
1 participant