ITSM

运维管理系统


建表语句

(1)如果数据库连接是pgsql

CREATE TABLE "public"."BasicFolder" (
  "uuid" text COLLATE "pg_catalog"."default" NOT NULL,
  "creator" text COLLATE "pg_catalog"."default",
  "creatorName" text COLLATE "pg_catalog"."default",
  "orderId" text COLLATE "pg_catalog"."default",
  "updateTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "parentId" text COLLATE "pg_catalog"."default",
  "createTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "updaterName" text COLLATE "pg_catalog"."default",
  "updater" text COLLATE "pg_catalog"."default",
  "name" text COLLATE "pg_catalog"."default",
  "describe" text COLLATE "pg_catalog"."default",
  "fullPath" text COLLATE "pg_catalog"."default",
  "fullPathName" text COLLATE "pg_catalog"."default",
  "parentName" text COLLATE "pg_catalog"."default",
  "state" int4,
  "sync" varchar(10) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Primary Key structure for table BasicFolder
-- ----------------------------
ALTER TABLE "public"."BasicFolder" ADD CONSTRAINT "BasicFolder_pkey" PRIMARY KEY ("uuid");

CREATE TABLE "public"."BasicDocument" (
  "uuid" text COLLATE "pg_catalog"."default" NOT NULL,
  "fileText" text COLLATE "pg_catalog"."default",
  "creator" text COLLATE "pg_catalog"."default",
  "filePath" text COLLATE "pg_catalog"."default",
  "creatorName" text COLLATE "pg_catalog"."default",
  "updateTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "updater" text COLLATE "pg_catalog"."default",
  "size" text COLLATE "pg_catalog"."default",
  "createTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "name" text COLLATE "pg_catalog"."default",
  "updaterName" text COLLATE "pg_catalog"."default",
  "state" int4,
  "fileType" text COLLATE "pg_catalog"."default",
  "folderId" varchar(36) COLLATE "pg_catalog"."default",
  "fullPath" text COLLATE "pg_catalog"."default",
  "fullPathName" text COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."BasicDocument"."folderId" IS '文件夹ID';
COMMENT ON COLUMN "public"."BasicDocument"."fullPath" IS '文件夹全路径';
COMMENT ON COLUMN "public"."BasicDocument"."fullPathName" IS '文件夹名称全路径';

-- ----------------------------
-- Primary Key structure for table BasicDocument
-- ----------------------------
ALTER TABLE "public"."BasicDocument" ADD CONSTRAINT "BasicDocument_pkey" PRIMARY KEY ("uuid");

CREATE TABLE "public"."BasicDocumentHistory" (
  "uuid" text COLLATE "pg_catalog"."default" NOT NULL,
  "createTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "updateTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "fileText" text COLLATE "pg_catalog"."default",
  "creator" text COLLATE "pg_catalog"."default",
  "filePath" text COLLATE "pg_catalog"."default",
  "creatorName" text COLLATE "pg_catalog"."default",
  "updater" text COLLATE "pg_catalog"."default",
  "size" text COLLATE "pg_catalog"."default",
  "bakFilePath" text COLLATE "pg_catalog"."default",
  "updaterName" text COLLATE "pg_catalog"."default",
  "name" text COLLATE "pg_catalog"."default",
  "state" int4,
  "fileType" text COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Primary Key structure for table BasicDocumentHistory
-- ----------------------------
ALTER TABLE "public"."BasicDocumentHistory" ADD CONSTRAINT "BasicDocumentHistory_pkey" PRIMARY KEY ("uuid");

CREATE TABLE "public"."BasicFolderDocumentRelationship" (
  "uuid" text COLLATE "pg_catalog"."default" NOT NULL,
  "group_" text COLLATE "pg_catalog"."default",
  "properties" text COLLATE "pg_catalog"."default",
  "createTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "updateTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "state" int4,
  "out_" text COLLATE "pg_catalog"."default",
  "in_" text COLLATE "pg_catalog"."default",
  "in_Class" text COLLATE "pg_catalog"."default",
  "out_Class" text COLLATE "pg_catalog"."default",
  "group_Class" text COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Primary Key structure for table BasicFolderDocumentRelationship
-- ----------------------------
ALTER TABLE "public"."BasicFolderDocumentRelationship" ADD CONSTRAINT "BasicFolderDocumentRelationship_pkey" PRIMARY KEY ("uuid");

CREATE TABLE "public"."BasicDocumentHistoryRelationship" (
  "uuid" text COLLATE "pg_catalog"."default" NOT NULL,
  "createTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "updateTime" text COLLATE "pg_catalog"."default" DEFAULT now(),
  "properties" text COLLATE "pg_catalog"."default",
  "group_" text COLLATE "pg_catalog"."default",
  "state" int4,
  "in_" text COLLATE "pg_catalog"."default",
  "out_" text COLLATE "pg_catalog"."default",
  "in_Class" text COLLATE "pg_catalog"."default",
  "out_Class" text COLLATE "pg_catalog"."default",
  "group_Class" text COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Primary Key structure for table BasicDocumentHistoryRelationship
-- ----------------------------
ALTER TABLE "public"."BasicDocumentHistoryRelationship" ADD CONSTRAINT "BasicDocumentHistoryRelationship_pkey" PRIMARY KEY ("uuid");

CREATE TABLE "public"."BasicFolderAuthority" (
  "uuid" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "type" int2,
  "extends" bool,
  "createTime" text COLLATE "pg_catalog"."default",
  "updateTime" text COLLATE "pg_catalog"."default",
  "name" varchar(64) COLLATE "pg_catalog"."default",
  "state" int2,
  "folderId" varchar(64) COLLATE "pg_catalog"."default",
  "allAuthority" int4
)
;

CREATE TABLE "BasicDocumentDeleteHistory"(    uuid VARCHAR(36)   PRIMARY KEY NOT NULL,    "state" INT,    "createTime" VARCHAR(50),    "updateTime" VARCHAR(50),    "name" TEXT,    "filePath" TEXT,    "size" VARCHAR(50),    "fileType" VARCHAR(50),    creator VARCHAR(50),    updater VARCHAR(50),    "creatorName" VARCHAR(50),    "updaterName" VARCHAR(50),    "folderId" VARCHAR(50),    "fullPath" TEXT,    "fullPathName" TEXT,    "deleteTime" VARCHAR(50),    "deleteUserId" VARCHAR(50),    "deleteUserName" VARCHAR(50));

DROP TABLE IF EXISTS "public"."BasicDeleteDocumentHistoryRelationship";CREATE TABLE "public"."BasicDeleteDocumentHistoryRelationship" (  "uuid" text COLLATE "pg_catalog"."default" NOT NULL,  "createTime" text COLLATE "pg_catalog"."default" DEFAULT now(),  "updateTime" text COLLATE "pg_catalog"."default" DEFAULT now(),  "properties" text COLLATE "pg_catalog"."default",  "group_" text COLLATE "pg_catalog"."default",  "state" int4,  "in_" text COLLATE "pg_catalog"."default",  "out_" text COLLATE "pg_catalog"."default",  "in_Class" text COLLATE "pg_catalog"."default",  "out_Class" text COLLATE "pg_catalog"."default",  "group_Class" text COLLATE "pg_catalog"."default");

(2) 如果数据库连接是odb (2.1)新增vertex

文件夹表 BasicFolder
文件表 BasicDocument
文件历史表 BasicDocumentHistory
文件夹权限表 BasicFolderAuthority
文档删除历史记录表 BasicDocumentDeleteHitory

(2.2)新增 edge

文件夹与文件关系表 BasicFolderDocumentRelationship
文件历史关系表 BasicDocumentHistoryRelationship

创建edge BasicDeleteDocumentHistoryRelationship  
from : BasicDocumentDeleteHistory
to: BasicDocumentHistory

2021.11.26新增文档操作日志

postgresSQL版本执行以下建表语句

create table "BasicDocumentLog"
(
    uuid varchar(36) constraint basicdocumentlog_pk primary key,
    "folderUuid" varchar(36),
    "folderName" varchar(255),
    "folderFullPathName" text,
    "documentUuid" varchar(36) not null,
    "documentName" text not null,
    "documentHistoryUuid" varchar(36),
    "documentHistoryName" text,
    operator varchar(36) not null,
    "operatorName" varchar(50) not null,
    type varchar(10) not null,
    "processUuid" varchar(36),
    "fieldId" varchar(50),
    name varchar(50),
    "createTime" varchar(20) not null,
    "updateTime" varchar(20),
    state int4
);
comment on column "BasicDocumentLog"."folderUuid" is '文件夹Uuid';
comment on column "BasicDocumentLog"."folderName" is '文件夹名称';
comment on column "BasicDocumentLog"."folderFullPathName" is '文件夹全路径';
comment on table "BasicDocumentLog" is '文档操作日志';
comment on column "BasicDocumentLog"."documentUuid" is '文档UUID';
comment on column "BasicDocumentLog"."documentName" is '文档名称';
comment on column "BasicDocumentLog"."documentHistoryUuid" is '文档历史UUID,替换文档时记录';
comment on column "BasicDocumentLog"."documentHistoryName" is '文档历史名称';
comment on column "BasicDocumentLog".operator is '操作人UUID';
comment on column "BasicDocumentLog"."operatorName" is '操作人名称';
comment on column "BasicDocumentLog".type is '操作类型';
comment on column "BasicDocumentLog"."processUuid" is '流程UUID,在流程文档控件中操作时记录';
comment on column "BasicDocumentLog"."fieldId" is '流程文档控件的唯一标识';

orientdb版执行

创建vertex BasicDocumentLog

页面列表

ITEM_HTML