MES-Springboot/scripts/sql/PostgreSQL-sys_user_role.sql

45 lines
1.6 KiB
MySQL
Raw Normal View History

2019-06-15 09:52:43 +00:00
/*
Navicat Premium Data Transfer
Source Server : postgre-sp
Source Server Type : PostgreSQL
Source Server Version : 110003
Source Host : localhost:5432
Source Catalog : sparchetype
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 110003
File Encoding : 65001
Date: 15/06/2019 17:11:05
*/
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_user_role";
CREATE TABLE "public"."sys_user_role" (
"id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
"user_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
"role_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
"created_by" varchar(64) COLLATE "pg_catalog"."default",
"created" timestamptz(0),
"last_upd_by" varchar(64) COLLATE "pg_catalog"."default",
"last_upd" timestamptz(0)
)
;
COMMENT ON COLUMN "public"."sys_user_role"."id" IS '用户角色关联id';
COMMENT ON COLUMN "public"."sys_user_role"."user_id" IS '用户id';
COMMENT ON COLUMN "public"."sys_user_role"."role_id" IS '角色id';
COMMENT ON COLUMN "public"."sys_user_role"."created_by" IS '创建人';
COMMENT ON COLUMN "public"."sys_user_role"."created" IS '创建时间';
COMMENT ON COLUMN "public"."sys_user_role"."last_upd_by" IS '最后更新人';
COMMENT ON COLUMN "public"."sys_user_role"."last_upd" IS '最后更新时间';
-- ----------------------------
-- Primary Key structure for table sys_user_role
-- ----------------------------
ALTER TABLE "public"."sys_user_role" ADD CONSTRAINT "sys_user_role_pkey" PRIMARY KEY ("id");