I created a table in a MySQL database via the following:
CREATE TABLE `newsubscriptions_orderspecification` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`display_name` varchar(256) NOT NULL,
`sub_def_id` integer UNSIGNED NOT NULL开发者_开发知识库,
`source_code_id` integer UNSIGNED NOT NULL,
`order_code_id` integer UNSIGNED NOT NULL,
`rate` numeric(5, 2) NOT NULL,
`type` varchar(4) NOT NULL,
`region` varchar(4) NOT NULL,
`term` varchar(4) NOT NULL,
`buyer_type` varchar(4) NOT NULL,
`is_active` bool NOT NULL,
UNIQUE (`sub_def_id`, `buyer_type`, `rate`, `is_active`)
)
;
How can I remove the uniqueness constraint?
use this:
ALTER TABLE `newsubscriptions_orderspecification` DROP INDEX `sub_def_id`
精彩评论