Skip to content

Commit

Permalink
***
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolicvs committed Sep 12, 2020
1 parent c2a52de commit 5dbeac7
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -423,27 +423,7 @@ CREATE TABLE IF NOT EXISTS profile_specifications(
updatedAt timestamp
);

drop table if exists unblurred_sites cascade;
CREATE TABLE unblurred_sites
(
id SERIAL PRIMARY KEY,
userid integer ,
sourceid integer ,
siteid integer,
x real NOT NULL,
y real NOT NULL,
geom geometry,
blurring_rule character(30) COLLATE pg_catalog."default" NOT NULL,
new_point boolean
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;

COMMENT ON TABLE unblurred_sites
IS 'Spatial table containing unblurred coordinates; userid, sourceid, siteid are not mandatory...';

--second part: function add_geom_from_x_y
--This function computes the geom attribute from x and y coordinates
--It just returns true when finished
Expand All @@ -453,13 +433,17 @@ CREATE TABLE unblurred_sites
(
id SERIAL PRIMARY KEY,
userid integer ,
sourceid integer ,
indexid varchar(120), -- in elasticsearch index_id holds all documents within. The reason of to remove sourceid from the table is simple I do not want to make unnecessary joins through source table.
docid varchar(100) , -- in index_id doc_id is symbolize one unique document.
siteid integer,
x real NOT NULL,
y real NOT NULL,
geom geometry,
blurring_rule character(30) COLLATE pg_catalog."default" NOT NULL,
new_point boolean
new_point boolean,
--do not delete the line below.
createdAt timestamp NOT NULL DEFAULT NOW(),
updatedAt timestamp
)
WITH (
OIDS = FALSE
Expand Down

0 comments on commit 5dbeac7

Please sign in to comment.