I have below table created in mysql.
CREATE TABLE `postitem` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`createdAt` datetime DEFAULT NULL,
`item_name` varchar(255) NOT NULL,
`createdBy_id` bigint(20) NOT NULL,
`post_category_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_4cscn0qw8u7go5hvmofq0ersg` (`post_category_id`,`item_name`),
KEY `FK_ncg8dotnqoetaiem6hiokvpwy` (`createdBy_id`),
CONSTRAINT `FK_ncg8dotnqoetaiem6hiokvpwy` FOREIGN KEY (`createdBy_id`) REFEREN CES `applicationuser` (`id`),
CONSTRAINT `FK_nfh1xw0eqqu9wg5hhl7iqdk56` FOREIGN KEY (`post_category_id`) REF ERENCES `postcategory` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=737 DEFAULT CHARSET=utf8 |
Now I need to add one more column createdBy_id
to UNIQUE KEY
. How can I do that?