mysql create and delete unique constraints

show keys from tb_receipt_status;

show keys from tb_receipt_transaction;

-- Inventory status table

alter table tb_receipt_status add unique key `unique_key`(asnno, source, asnstatus);

-- Transaction Transaction (Receipt Details) 

alter table tb_receipt_transaction add unique key `unique_key`(transactionid, source);

-- Listing tasks

alter table tb_tsk_tasklists add unique key `unique_key`(taskid, source, taskid_sequence);

-- outbound status

alter table tb_order_status add unique key `unique_key`(orderno, source, sostatus);

-- allocation details

alter table tb_act_allocation_details add unique key `unique_key`(allocationdetailsid, source);

 

-- Inventory status table

alter table tb_receipt_status drop key `unique_key`;

-- Transaction Transaction (Receipt Details) 

alter table tb_receipt_transaction drop key `unique_key`;

-- Listing tasks

alter table tb_tsk_tasklists drop key `unique_key`;

-- outbound status

alter table tb_order_status drop key `unique_key`;

-- allocation details

alter table tb_act_allocation_details drop key `unique_key`;

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326860126&siteId=291194637