Open Dedej-Bergin opened 3 months ago
A starting point to look at could be here in scbuildstmt/alter_table_add_column
// Unique without an index is unsupported.
if d.Unique.WithoutIndex {
// TODO(rytaft): add support for this in the future if we want to expose
// UNIQUE WITHOUT INDEX to users.
panic(errors.WithHint(
pgerror.New(
pgcode.FeatureNotSupported,
"adding a column marked as UNIQUE WITHOUT INDEX is unsupported",
),
"add the column first, then run ALTER TABLE ... ADD CONSTRAINT to add a "+
"UNIQUE WITHOUT INDEX constraint on the column",
))
}
Is your feature request related to a problem? Please describe. This is one of the missing pieces to support ALTER TABLE ADD COLUMN fully in the declarative schema changer.
Describe the solution you'd like
Jira issue: CRDB-41235
Epic CRDB-31282