dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Dolt does not allow the dropping of a column with check constraint

Open VinaiRachakonda opened this issue 2 years ago • 1 comments

Consider the following table

create table mytable (pk int primary key);
ALTER TABLE mytable ADD COLUMN col2 text NOT NULL;
ALTER TABLE mytable ADD CONSTRAINT constraint_check CHECK (col2 LIKE '%myregex%');
 ALTER TABLE mytable DROP COLUMN col2;

Dolt throws the error : can't alter column "col2" because it would invalidate check constraint "constraint_check"

MySQL allows this behavior

VinaiRachakonda avatar Apr 04 '22 17:04 VinaiRachakonda

Cc skipped test here

VinaiRachakonda avatar Aug 08 '22 22:08 VinaiRachakonda