管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-19 31bfaa54f63b023ac6c4c26d0718c7bdf4276b8f
data/db_tab.sql
@@ -548,13 +548,13 @@
  create_time timestamp(6) without time zone default now(),
  update_user integer,
  update_time timestamp(6) without time zone,
  geo geometry default null,
  CONSTRAINT enforce_dims_geom CHECK (st_ndims(geo) = 2),
  CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geo) = 'POLYGON'::text OR geo IS NULL),
  CONSTRAINT enforce_srid_geom CHECK (st_srid(geo) = 4490)
  geom geometry default null,
  CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2),
  CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL),
  CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4490)
);
-- drop index index_sys_meta_geo;
create index index_sys_meta_geo on lf.sys_meta using GIST (geo);
-- drop index index_sys_meta_geom;
create index index_sys_meta_geom on lf.sys_meta 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.name is '名称';
@@ -572,10 +572,10 @@
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.geo is '空间位置';
-- insert into lf.sys_meta(dirid,depid,name,geo,sizes) values (1,1,'Test',ST_PolygonFromText('POLYGON ((100 0,120 0,120 20,100 20,100 0))',4490),0.001);
comment on column lf.sys_meta.geom is '空间位置';
-- 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(geo) from lf.sys_meta;
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(
@@ -761,13 +761,13 @@
  create_time timestamp(6) without time zone default now(),
  download_user integer,
  download_time timestamp(6) without time zone,
  geo geometry default null,
  geom geometry default null,
  bak varchar(1024)
  CONSTRAINT enforce_dims_geom CHECK (st_ndims(geo) = 2),
  CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geo) = 'POLYGON'::text OR geo IS NULL),
  CONSTRAINT enforce_srid_geom CHECK (st_srid(geo) = 4490)
  CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2),
  CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL),
  CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4490)
);
create index index_sys_download_geo on lf.sys_download using gist (geo);
create index index_sys_download_geom on lf.sys_download using gist (geom);
comment on table lf.sys_download is '下载记录表';
comment on column lf.sys_download.id is '主键ID';
comment on column lf.sys_download.name is '名称';
@@ -783,7 +783,7 @@
comment on column lf.sys_download.download_user is '下载人ID';
comment on column lf.sys_download.download_time is '下载时间';
comment on column lf.sys_download.bak is '备注';
comment on column lf.sys_download.geo is '空间位置';
comment on column lf.sys_download.geom is '空间位置';
-- insert into lf.sys_download (name,pwd,url,descr) values ('2022-09-27','123456','','测试下载');
select * from lf.sys_download;