Skip to content

sql/schemachanger: support ALTER TABLE ... SET SCHEMA ... in declarative schema changer #155989

@rafiss

Description

@rafiss

We should add support in the declarative schema changer for all operations for moving a table (or view or sequence) to a new schema.

This includes all the syntax in tree.AlterTableSetSchema:

type AlterTableSetSchema struct {
Name *UnresolvedObjectName
Schema Name
IfExists bool
IsView bool
IsMaterialized bool
IsSequence bool
}

Review the legacy implementation in: pkg/sql/alter_table_set_schema.go

Epic CRDB-31281

Jira issue: CRDB-55732

Metadata

Metadata

Assignees

Labels

A-schema-changer-implRelated to the implementation of the new schema changerC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions