Add meta fields to schema.

Many tables now have a JSON (jsonb) column to
hold unstructured data.
This commit is contained in:
D. Berge
2020-09-06 13:37:11 +02:00
parent 1124a48e8c
commit 3e949f6185

View File

@@ -2,8 +2,8 @@
-- PostgreSQL database dump
--
-- Dumped from database version 11.7
-- Dumped by pg_dump version 12.2
-- Dumped from database version 12.4
-- Dumped by pg_dump version 12.4
SET statement_timeout = 0;
SET lock_timeout = 0;
@@ -172,6 +172,8 @@ NOTE: The proper way of doing this would be to define an EngineeringCRS in the s
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: labels; Type: TABLE; Schema: _SURVEY__TEMPLATE_; Owner: postgres
--
@@ -202,7 +204,8 @@ CREATE TABLE _SURVEY__TEMPLATE_.raw_shots (
objref integer NOT NULL,
tstamp timestamp with time zone NOT NULL,
hash text NOT NULL,
geometry public.geometry(Point,_EPSG__CODE_)
geometry public.geometry(Point,_EPSG__CODE_),
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -261,7 +264,8 @@ CREATE TABLE _SURVEY__TEMPLATE_.events_seq (
id integer NOT NULL,
remarks text NOT NULL,
sequence integer NOT NULL,
point integer NOT NULL
point integer NOT NULL,
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -301,7 +305,8 @@ ALTER TABLE _SURVEY__TEMPLATE_.events_seq_timed OWNER TO postgres;
CREATE TABLE _SURVEY__TEMPLATE_.events_timed (
id integer NOT NULL,
remarks text NOT NULL,
tstamp timestamp with time zone NOT NULL
tstamp timestamp with time zone NOT NULL,
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -328,7 +333,8 @@ CREATE TABLE _SURVEY__TEMPLATE_.preplot_points (
point integer NOT NULL,
class character(1) NOT NULL,
ntba boolean DEFAULT false NOT NULL,
geometry public.geometry(Point,_EPSG__CODE_) NOT NULL
geometry public.geometry(Point,_EPSG__CODE_) NOT NULL,
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -362,7 +368,8 @@ CREATE TABLE _SURVEY__TEMPLATE_.raw_lines (
line integer NOT NULL,
remarks text DEFAULT ''::text NOT NULL,
ntbp boolean DEFAULT false NOT NULL,
incr boolean NOT NULL
incr boolean NOT NULL,
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -657,7 +664,8 @@ be provided to purge this old data at suitable intervals.
CREATE TABLE _SURVEY__TEMPLATE_.final_lines (
sequence integer NOT NULL,
line integer NOT NULL,
remarks text DEFAULT ''::text NOT NULL
remarks text DEFAULT ''::text NOT NULL,
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -695,7 +703,8 @@ CREATE TABLE _SURVEY__TEMPLATE_.final_shots (
objref integer NOT NULL,
tstamp timestamp with time zone NOT NULL,
hash text NOT NULL,
geometry public.geometry(Point,_EPSG__CODE_)
geometry public.geometry(Point,_EPSG__CODE_),
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);
@@ -851,7 +860,8 @@ CREATE TABLE _SURVEY__TEMPLATE_.preplot_lines (
remarks text NOT NULL,
ntba boolean DEFAULT false NOT NULL,
geometry public.geometry(LineString,_EPSG__CODE_) NOT NULL,
hash text NOT NULL
hash text NOT NULL,
meta jsonb DEFAULT '{}'::jsonb NOT NULL
);