Start region work
This commit is contained in:
@@ -3,10 +3,9 @@
|
||||
create table coordinates
|
||||
(
|
||||
node varchar(32) primary key references _node(id)
|
||||
, coord point not null
|
||||
, coord geometry
|
||||
);
|
||||
|
||||
-- delete when delete node
|
||||
|
||||
create index coordinates_spgist on coordinates using spgist(coord);
|
||||
create index coordinates_gist on coordinates using gist(coord);
|
||||
|
||||
9
script/sql/create/32.virtual_district.sql
Normal file
9
script/sql/create/32.virtual_district.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
create table virtual_district
|
||||
(
|
||||
id text primary key
|
||||
, center varchar(32) references _node(id) not null unique
|
||||
, boundary geometry unique
|
||||
, nodes varchar(32)[]
|
||||
);
|
||||
|
||||
create index virtual_district_gist on virtual_district using gist(boundary);
|
||||
@@ -2,6 +2,4 @@
|
||||
|
||||
drop index if exists coordinates_gist;
|
||||
|
||||
drop index if exists coordinates_spgist;
|
||||
|
||||
drop table if exists coordinates;
|
||||
|
||||
3
script/sql/drop/32.virtual_district.sql
Normal file
3
script/sql/drop/32.virtual_district.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
drop index if exists virtual_district_gist;
|
||||
|
||||
drop table if exists virtual_district;
|
||||
Reference in New Issue
Block a user