完成用户中心,用户权限管理系统,内容管理系统的数据库sql的编写

This commit is contained in:
lishouyu
2017-08-21 10:47:05 +08:00
parent fb1f836d1a
commit 04c463d6e8
3 changed files with 324 additions and 11 deletions
+10 -9
View File
@@ -158,7 +158,7 @@ CREATE TABLE upms_permission (
`orders` BIGINT(20) UNSIGNED DEFAULT NULL
COMMENT '排序',
PRIMARY KEY (`id`),
KEY `system_id_index` (`system_id`) USING BTREE COMMENT 'B+树索引'
KEY `upms_permission_system_id_index` (`system_id`) USING BTREE COMMENT 'B+树索引'
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8;
@@ -195,6 +195,7 @@ CREATE TABLE upms_system (
ENGINE = InnoDB
DEFAULT CHARSET = utf8;
# 关联关系表
-- --------------------------
-- upms_user_organization 用户_组织关联表
-- --------------------------
@@ -207,8 +208,8 @@ CREATE TABLE upms_user_organization (
`organization_id` INT(10) UNSIGNED NOT NULL
COMMENT '组织编号',
PRIMARY KEY (`user_organization_id`),
KEY `user_id_index` (`user_id`) USING BTREE COMMENT 'B+树索引',
KEY `organization_id_index` (`organization_id`) USING BTREE COMMENT 'B+树索引'
KEY `upms_user_organization_user_id_index` (`user_id`) USING BTREE COMMENT 'B+树索引',
KEY `upms_user_organization_organization_id_index` (`organization_id`) USING BTREE COMMENT 'B+树索引'
)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
@@ -225,8 +226,8 @@ CREATE TABLE upms_user_role (
`role_id` INT(10) UNSIGNED NOT NULL
COMMENT '角色编号',
PRIMARY KEY (`user_role_id`),
KEY `user_id_index` (`user_id`) USING BTREE COMMENT 'B+树索引',
KEY `role_id_index` (`role_id`) USING BTREE COMMENT 'B+树索引'
KEY ` upms_user_role_user_id_index` (`user_id`) USING BTREE COMMENT 'B+树索引',
KEY ` upms_user_role_role_id_index` (`role_id`) USING BTREE COMMENT 'B+树索引'
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8;
@@ -246,8 +247,8 @@ CREATE TABLE upms_user_permission (
`type` TINYINT(4) NOT NULL
COMMENT '权限类型 -1 减权限',
PRIMARY KEY (`user_permission_id`),
KEY `user_id_index` (`user_id`) USING BTREE COMMENT 'B+树索引',
KEY `permission_id_index` (`permission_id`) USING BTREE COMMENT 'B+树索引'
KEY `upms_user_permission_user_id_index` (`user_id`) USING BTREE COMMENT 'B+树索引',
KEY `upms_user_permission_permission_id_index` (`permission_id`) USING BTREE COMMENT 'B+树索引'
)
ENGINE = InnoDB
DEFAULT CHARSET utf8;
@@ -264,8 +265,8 @@ CREATE TABLE upms_role_permission (
`permission_id` INT(10) UNSIGNED NOT NULL
COMMENT '权限编号',
PRIMARY KEY (`role_permission_id`),
KEY `role_id_index` (`role_id`) USING BTREE COMMENT 'B+树索引',
KEY `permission_id_index` (`permission_id`) USING BTREE COMMENT 'B+书索引'
KEY `upms_role_permission_role_id_index` (`role_id`) USING BTREE COMMENT 'B+树索引',
KEY `upms_role_permission_permission_id_index` (`permission_id`) USING BTREE COMMENT 'B+书索引'
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8;