在下面的查询中,我需要使用IMEI_CODE
将REGISTRATION_ID
和unique index
non unique index
更改为alter query
。如何实现
CREATE TABLE `ringee_user` (
`RINGEE_USER_ID` BIGINT(20) NOT NULL,
`USER_NAME` VARCHAR(40) NOT NULL,
`IMEI_CODE` VARCHAR(45) NOT NULL,
`REGISTRATION_ID` VARCHAR(200) NOT NULL,
`MOBILE_NUMBER` VARCHAR(14) NOT NULL,
`CREATED_DTTM` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`MODIFIED_DTTM` TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`IS_DELETE` TINYINT(1) NULL DEFAULT '0',
PRIMARY KEY (`RINGEE_USER_ID`),
UNIQUE INDEX `REG_ID_UNIQUE` (`REGISTRATION_ID`),
UNIQUE INDEX `MOBILE_NUMBER_UNIQUE` (`MOBILE_NUMBER`),
UNIQUE INDEX `IMEI_CODE_UNIQUE` (`IMEI_CODE`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;
ALTER TABLE `ringee_user`
CHANGE COLUMN `IS_DELETE` `IS_DELETE` TINYINT(1) NULL DEFAULT '0' AFTER `MOBILE_NUMBER`;