fix: sql系统部门初始数据
This commit is contained in:
@@ -45,12 +45,8 @@ CREATE TABLE `sys_dept` (
|
|||||||
-- Dumping data for table `sys_dept`
|
-- Dumping data for table `sys_dept`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `sys_dept` WRITE;
|
INSERT INTO `sys_dept` VALUES (1, 0, '0', 'dept.root', 0, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, NULL, 0);
|
||||||
/*!40000 ALTER TABLE `sys_dept` DISABLE KEYS */;
|
INSERT INTO `sys_dept` VALUES (2, 1, '0,1', 'dept.root.item1', 1, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, 'supervisor', 1715570736053);
|
||||||
INSERT INTO `sys_dept` VALUES (1,0,'0','dept.root',0,'supervisor',NULL,NULL,'1','0','supervisor',1699348237468,NULL,0),(101,100,'0,100','dept.root.item1',1,'supervisor',NULL,NULL,'1','0','supervisor',1699348237468,NULL,0);
|
|
||||||
/*!40000 ALTER TABLE `sys_dept` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
SET FOREIGN_KEY_CHECKS=0;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `sys_menu`;
|
||||||
CREATE TABLE IF NOT EXISTS `sys_dept` (
|
CREATE TABLE IF NOT EXISTS `sys_dept` (
|
||||||
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id',
|
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id',
|
||||||
`parent_id` bigint(20) DEFAULT 0 COMMENT '父部门id 默认0',
|
`parent_id` bigint(20) DEFAULT 0 COMMENT '父部门id 默认0',
|
||||||
@@ -18,109 +19,7 @@ CREATE TABLE IF NOT EXISTS `sys_dept` (
|
|||||||
PRIMARY KEY (`dept_id`) USING BTREE
|
PRIMARY KEY (`dept_id`) USING BTREE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表';
|
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表';
|
||||||
|
|
||||||
-- -- add default dept
|
INSERT IGNORE INTO `sys_dept` VALUES (1, 0, '0', 'dept.root', 0, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, NULL, 0);
|
||||||
|
INSERT IGNORE INTO `sys_dept` VALUES (2, 1, '0,1', 'dept.root.item1', 1, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, 'supervisor', 1715570736053);
|
||||||
INSERT
|
|
||||||
IGNORE INTO `omc_db`.`sys_dept` (
|
|
||||||
`dept_id`,
|
|
||||||
`parent_id`,
|
|
||||||
`ancestors`,
|
|
||||||
`dept_name`,
|
|
||||||
`order_num`,
|
|
||||||
`leader`,
|
|
||||||
`phone`,
|
|
||||||
`email`,
|
|
||||||
`status`,
|
|
||||||
`del_flag`,
|
|
||||||
`create_by`,
|
|
||||||
`create_time`,
|
|
||||||
`update_by`,
|
|
||||||
`update_time`
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
100,
|
|
||||||
0,
|
|
||||||
'0',
|
|
||||||
'系统维护部',
|
|
||||||
0,
|
|
||||||
'admin',
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
'1',
|
|
||||||
'0',
|
|
||||||
'admin',
|
|
||||||
1697091866188,
|
|
||||||
'',
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT
|
|
||||||
IGNORE INTO `omc_db`.`sys_dept` (
|
|
||||||
`dept_id`,
|
|
||||||
`parent_id`,
|
|
||||||
`ancestors`,
|
|
||||||
`dept_name`,
|
|
||||||
`order_num`,
|
|
||||||
`leader`,
|
|
||||||
`phone`,
|
|
||||||
`email`,
|
|
||||||
`status`,
|
|
||||||
`del_flag`,
|
|
||||||
`create_by`,
|
|
||||||
`create_time`,
|
|
||||||
`update_by`,
|
|
||||||
`update_time`
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
101,
|
|
||||||
100,
|
|
||||||
'0,100',
|
|
||||||
'运维一部',
|
|
||||||
1,
|
|
||||||
'admin',
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
'1',
|
|
||||||
'0',
|
|
||||||
'admin',
|
|
||||||
1697091866192,
|
|
||||||
'',
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
-- for cn/en locale
|
|
||||||
UPDATE `omc_db`.`sys_dept`
|
|
||||||
SET
|
|
||||||
`parent_id` = 0,
|
|
||||||
`ancestors` = '0',
|
|
||||||
`dept_name` = 'dept.root',
|
|
||||||
`order_num` = 0,
|
|
||||||
`leader` = 'supervisor',
|
|
||||||
`phone` = NULL,
|
|
||||||
`email` = NULL,
|
|
||||||
`status` = '1',
|
|
||||||
`del_flag` = '0',
|
|
||||||
`create_by` = 'supervisor',
|
|
||||||
`create_time` = 1699348237468,
|
|
||||||
`update_by` = NULL,
|
|
||||||
`update_time` = 0
|
|
||||||
WHERE `dept_id` = 100;
|
|
||||||
|
|
||||||
UPDATE `omc_db`.`sys_dept`
|
|
||||||
SET
|
|
||||||
`parent_id` = 100,
|
|
||||||
`ancestors` = '0,100',
|
|
||||||
`dept_name` = 'dept.root.item1',
|
|
||||||
`order_num` = 1,
|
|
||||||
`leader` = 'supervisor',
|
|
||||||
`phone` = NULL,
|
|
||||||
`email` = NULL,
|
|
||||||
`status` = '1',
|
|
||||||
`del_flag` = '0',
|
|
||||||
`create_by` = 'supervisor',
|
|
||||||
`create_time` = 1699348237468,
|
|
||||||
`update_by` = NULL,
|
|
||||||
`update_time` = 0
|
|
||||||
WHERE `dept_id` = 101;
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=1;
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
Reference in New Issue
Block a user