DBZ-2080 Support named PKs in ALTER TABLE
This commit is contained in:
parent
e0f577217d
commit
5940c85103
@ -598,7 +598,7 @@ alterSpecification
|
||||
')' #alterByAddColumns
|
||||
| ADD indexFormat=(INDEX | KEY) uid? indexType?
|
||||
indexColumnNames indexOption* #alterByAddIndex
|
||||
| ADD (CONSTRAINT name=uid?)? PRIMARY KEY
|
||||
| ADD (CONSTRAINT name=uid?)? PRIMARY KEY index=uid?
|
||||
indexType? indexColumnNames indexOption* #alterByAddPrimaryKey
|
||||
| ADD (CONSTRAINT name=uid?)? UNIQUE
|
||||
indexFormat=(INDEX | KEY)? indexName=uid?
|
||||
|
@ -11,6 +11,10 @@ alter table t2 drop primary key;
|
||||
alter table t3 rename to table3column;
|
||||
alter table childtable add constraint `fk1` foreign key (idParent) references parenttable(id) on delete restrict on update cascade;
|
||||
alter table table3column default character set = cp1251;
|
||||
alter table table1 add primary key (id);
|
||||
alter table table1 add primary key table_pk (id);
|
||||
alter table table1 add primary key `table_pk` (id);
|
||||
alter table table1 add primary key `table_pk` (`id`);
|
||||
#end
|
||||
#begin
|
||||
-- Alter database
|
||||
|
Loading…
Reference in New Issue
Block a user