rt-sim-training-service/sql/20220929-wei-org-project.sql

11 lines
526 B
MySQL
Raw Normal View History

create TABLE `org_project` (
`id` int NOT NULL AUTO_INCREMENT comment '主键',
`org_id` int NOT NULL comment '组织ID',
`project_code` varchar(255) NOT NULL comment '项目编码',
`creator_id` int DEFAULT NULL comment '创建者',
`create_time` datetime DEFAULT NULL comment '创建时间',
PRIMARY KEY (`id`),
UNIQUE KEY `org_id_2` (`org_id`,`project_code`),
KEY `org_id` (`org_id`),
KEY `project_code` (`project_code`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;