管道基础大数据平台系统开发-【后端】-Server
5
13693261870
2023-01-09 57c63c7af9bcff4d38da1bf247ec0eac21887c48
data/db_tab.sql
@@ -593,36 +593,56 @@
-- insert into lf.sys_meta(dirid,depid,name,geom,sizes) values (1,1,'Test',ST_PolygonFromText('POLYGON ((100 0,120 0,120 20,100 20,100 0))',4490),0.001);
select * from lf.sys_meta; select id,name,dirid,depid,verid,type,sizes,descr,create_user,create_time,update_user,update_time,st_astext(geom) from lf.sys_meta;
----------------------------------------------------------------------------------------------------- 17.元数据文件表
-- DROP TABLE IF EXISTS lf.sys_meta_file;
create table lf.sys_meta_file(
----------------------------------------------------------------------------------------------------- 16.元数据表-New
-- DROP TABLE IF EXISTS lf.sys_meta; DROP TABLE IF EXISTS lf.sys_meta_file;
create table lf.sys_meta_new (
  id serial primary key,
  eventid varchar(38) default new_guid(),
  metaid integer default 0,
  dirid integer default 0,
  depid integer default 0,
  verid integer default 0,
  name varchar(256),
  metaid integer,
  fileid integer default 0,
  guid varchar(40) default new_guid(),
  type varchar(100),
  guid varchar(38) default new_guid(),
  path varchar(512),
  sizes float default 0,
  sizes float8 default 0,
  tab varchar(50),
  rows integer default 0,
  create_user integer default 1,
  create_time timestamp(6) without time zone default now(),
  update_user integer,
  update_time timestamp(6) without time zone
  update_time timestamp(6) without time zone,
  bak varchar(1024),
  geom geometry(MultiPolygon, 4490)
);
comment on table lf.sys_meta_file is '元数据文件表';
comment on column lf.sys_meta_file.id is '主键ID';
comment on column lf.sys_meta_file.name is '文件名';
comment on column lf.sys_meta_file.metaid is '元数据ID';
comment on column lf.sys_meta_file.fileid is '父文件ID:0-没有';
comment on column lf.sys_meta_file.guid is '文件ID';
comment on column lf.sys_meta_file.path is '存储路径';
comment on column lf.sys_meta_file.sizes is '文件大小:单位MB';
comment on column lf.sys_meta_file.create_user is '创建人ID';
comment on column lf.sys_meta_file.create_time is '创建时间';
comment on column lf.sys_meta_file.update_user is '更新人ID';
comment on column lf.sys_meta_file.update_time is '更新时间';
-- insert into lf.sys_meta_file (metaid,name,path) values (1,'a.jpg','c:\a.jpg');
-- drop index index_sys_meta_geom;
create index index_sys_meta_geom on lf.sys_meta_new using GIST (geom);
comment on table lf.sys_meta is '元数据表';
comment on column lf.sys_meta.id is '主键ID';
comment on column lf.sys_meta.eventid is 'GUID';
comment on column lf.sys_meta.metaid is '父元数据ID:0-没有';
comment on column lf.sys_meta.dirid is '目录ID';
comment on column lf.sys_meta.depid is '单位ID';
comment on column lf.sys_meta.verid is '版本ID';
comment on column lf.sys_meta.name is '名称';
comment on column lf.sys_meta.type is '类型:file-文件,shp-ShapeFile,gdb-GDB,zip-压缩包';
comment on column lf.sys_meta.guid is '文件GUID';
comment on column lf.sys_meta.path is '存储路径';
comment on column lf.sys_meta.sizes is '大小:单位MB';
comment on column lf.sys_meta.tab is '表名';
comment on column lf.sys_meta.rows is '行数';
comment on column lf.sys_meta.create_user is '创建人ID';
comment on column lf.sys_meta.create_time is '创建时间';
comment on column lf.sys_meta.update_user is '更新人ID';
comment on column lf.sys_meta.update_time is '更新时间';
comment on column lf.sys_meta.bak is '备注';
comment on column lf.sys_meta.geom is '空间位置';
-- insert into lf.sys_meta(dirid,depid,geom,sizes,name,path) values (1,1,ST_PolygonFromText('MultiPolygon (((100 0,120 0,120 20,100 20,100 0)))', 4490),0.001,'a.jpg','c:\a.jpg');
-- alter table lf.sys_meta rename column bstab to tab; alter table lf.sys_meta drop column mdtab;
select * from lf.sys_meta_file;
select * from lf.sys_meta; select a.*,st_astext(geom) from lf.sys_meta a;
----------------------------------------------------------------------------------------------------- 18.附件表
-- DROP TABLE IF EXISTS lf.sys_attach;
create table lf.sys_attach(
@@ -1098,59 +1118,6 @@
comment on column lf.sys_flow.update_time is '更新时间';
select * from lf.sys_flow;
----------------------------------------------------------------------------------------------------- 16.元数据表-New
-- DROP TABLE IF EXISTS lf.sys_meta; DROP TABLE IF EXISTS lf.sys_meta_file;
create table lf.sys_meta_new (
  id serial primary key,
  eventid varchar(38) default new_guid(),
  metaid integer default 0,
  dirid integer default 0,
  depid integer default 0,
  verid integer default 0,
  name varchar(256),
  type varchar(100),
  guid varchar(38) default new_guid(),
  path varchar(512),
  sizes float8 default 0,
  bstab varchar(50),
  bsrows integer default 0,
  mdtab varchar(50),
  mdrows integer default 0,
  create_user integer default 1,
  create_time timestamp(6) without time zone default now(),
  update_user integer,
  update_time timestamp(6) without time zone,
  bak varchar(1024),
  geom geometry(MultiPolygon, 4490)
);
-- drop index index_sys_meta_geom;
create index index_sys_meta_geom on lf.sys_meta_new using GIST (geom);
comment on table lf.sys_meta is '元数据表';
comment on column lf.sys_meta.id is '主键ID';
comment on column lf.sys_meta.eventid is 'GUID';
comment on column lf.sys_meta.metaid is '父元数据ID:0-没有';
comment on column lf.sys_meta.dirid is '目录ID';
comment on column lf.sys_meta.depid is '单位ID';
comment on column lf.sys_meta.verid is '版本ID';
comment on column lf.sys_meta.name is '名称';
comment on column lf.sys_meta.type is '类型:file-文件,shp-ShapeFile,gdb-GDB,zip-压缩包';
comment on column lf.sys_meta.guid is '文件GUID';
comment on column lf.sys_meta.path is '存储路径';
comment on column lf.sys_meta.sizes is '大小:单位MB';
comment on column lf.sys_meta.bstab is '业务表名';
comment on column lf.sys_meta.bsrows is '业务表行数';
comment on column lf.sys_meta.mdtab is '元数据表名';
comment on column lf.sys_meta.mdrows is '元数据行数';
comment on column lf.sys_meta.create_user is '创建人ID';
comment on column lf.sys_meta.create_time is '创建时间';
comment on column lf.sys_meta.update_user is '更新人ID';
comment on column lf.sys_meta.update_time is '更新时间';
comment on column lf.sys_meta.bak is '备注';
comment on column lf.sys_meta.geom is '空间位置';
-- insert into lf.sys_meta(dirid,depid,geom,sizes,name,path) values (1,1,ST_PolygonFromText('MultiPolygon (((100 0,120 0,120 20,100 20,100 0)))', 4490),0.001,'a.jpg','c:\a.jpg');
-- create table lf.sys_meta as select * from lf.sys_meta_new;
select * from lf.sys_meta_new; select a.*,st_astext(geom) from lf.sys_meta a;
----------------------------------------------------------------------------------------------------- 32.FME日志表
create table lf.sys_fme_log (
  id serial primary key,