Add general region table
This commit is contained in:
7
script/sql/create/32.region.sql
Normal file
7
script/sql/create/32.region.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
create table region
|
||||
(
|
||||
id text primary key
|
||||
, boundary geometry not null unique
|
||||
);
|
||||
|
||||
create index region_gist on region using gist(boundary);
|
||||
@@ -1,9 +0,0 @@
|
||||
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);
|
||||
3
script/sql/drop/32.region.sql
Normal file
3
script/sql/drop/32.region.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
drop index if exists region_gist;
|
||||
|
||||
drop table if exists region;
|
||||
@@ -1,3 +0,0 @@
|
||||
drop index if exists virtual_district_gist;
|
||||
|
||||
drop table if exists virtual_district;
|
||||
Reference in New Issue
Block a user