add primary key

This commit is contained in:
Ulric Qin 2022-08-29 11:27:53 +08:00
parent 940313bd4e
commit 8c45479c02
1 changed files with 4 additions and 2 deletions

View File

@ -45,7 +45,8 @@ CREATE TABLE `user_group_member` (
`group_id` bigint unsigned not null,
`user_id` bigint unsigned not null,
KEY (`group_id`),
KEY (`user_id`)
KEY (`user_id`),
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
insert into user_group_member(group_id, user_id) values(1, 1);
@ -75,7 +76,8 @@ CREATE TABLE `role_operation`(
`role_name` varchar(128) not null,
`operation` varchar(191) not null,
KEY (`role_name`),
KEY (`operation`)
KEY (`operation`),
PRIMARY KEY(`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
-- Admin is special, who has no concrete operation but can do anything.