优化Ldap的部门同步

This commit is contained in:
xxx
2023-11-14 11:07:56 +08:00
parent 8f27bb9fda
commit 8c905c6552
10 changed files with 549 additions and 84 deletions

View File

@@ -713,6 +713,27 @@ public class MigrationCheck implements CommandLineRunner {
""");
}
});
add(
new HashMap<>() {
{
put("table", "ldap_department");
put("name", "20231113_15_44_17_ldap_department");
put(
"sql",
"""
CREATE TABLE `ldap_department` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`uuid` varchar(64) NOT NULL DEFAULT '' COMMENT '唯一特征值',
`department_id` int(11) NOT NULL DEFAULT 0 COMMENT '部门ID',
`dn` varchar(120) NOT NULL DEFAULT '' COMMENT 'dn',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_uuid` (`uuid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
""");
}
});
}
};