DBZ-2760 Support for DROP CONSTRAINT

This commit is contained in:
Jiri Pechanec 2020-11-13 15:12:02 +01:00
parent 7f32211814
commit 74cf3ea106
2 changed files with 3 additions and 1 deletions

View File

@ -622,6 +622,7 @@ alterSpecification
| MODIFY COLUMN? ifExists?
uid columnDefinition (FIRST | AFTER uid)? #alterByModifyColumn // ifExists is MariaDB-specific
| DROP COLUMN? ifExists? uid RESTRICT? #alterByDropColumn // ifExists is MariaDB-specific
| DROP (CONSTRAINT | CHECK) uid #alterByDropConstraintCheck
| DROP PRIMARY KEY #alterByDropPrimaryKey
| DROP indexFormat=(INDEX | KEY) ifExists? uid #alterByDropIndex
| RENAME indexFormat=(INDEX | KEY) uid TO uid #alterByRenameIndex

View File

@ -4,6 +4,7 @@ alter table ship_class add column ship_spec varchar(150) first, add somecol int
alter table t3 add column (c2 decimal(10, 2) comment 'comment`' null, c3 enum('abc', 'cba', 'aaa')), add index t3_i1 using btree (c2) comment 'some index';
alter table t3 add column (c4 decimal(10, 2) comment 'comment`' null), add index t3_i2 using btree (c4) comment 'some index';
alter table t2 add constraint t2_pk_constraint primary key (1c), alter column `_` set default 1;
alter table t2 drop constraint t2_pk_constraint;
alter table ship_class change column somecol col_for_del tinyint first;
alter table ship_class drop col_for_del;
alter table t3 drop index t3_i1;
@ -100,4 +101,4 @@ alter user 'user'@'%' identified with 'mysql_native_password' as '*2470C0C06DEE4
require none password expire default account unlock password_lock_time 2;
alter user 'user'@'%' identified with 'mysql_native_password' as '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'
require none password expire default account unlock password_lock_time unbounded;
#end
#end