Skip to content

Commit 69e0744

Browse files
authored
fix ddl (#117)
1 parent 5afaee9 commit 69e0744

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

db/envcd.sql

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ SET FOREIGN_KEY_CHECKS = 0;
2424
DROP TABLE IF EXISTS `scopespace`;
2525
CREATE TABLE `scopespace` (
2626
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
27+
`user_id` int(10) unsigned NOT NULL,
2728
`name` varchar(100) NOT NULL,
2829
`note` varchar(150) NOT NULL,
2930
`state` varchar(12) NOT NULL DEFAULT 'enabled' COMMENT 'enabled; disabled; deleted',
3031
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
3132
`updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
32-
PRIMARY KEY (`id`)
33+
PRIMARY KEY (`id`),
34+
UNIQUE KEY `ukey` (`user_id`,`name`) USING BTREE
3335
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
3436

3537
-- ----------------------------

0 commit comments

Comments
 (0)