From 8c45479c02c1cf2e2a7f62501d4467bae6dec683 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Mon, 29 Aug 2022 11:27:53 +0800 Subject: [PATCH] add primary key --- docker/initsql/a-n9e.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/initsql/a-n9e.sql b/docker/initsql/a-n9e.sql index cf21d8de..adcfc96c 100644 --- a/docker/initsql/a-n9e.sql +++ b/docker/initsql/a-n9e.sql @@ -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.