Mercurial > gemma
comparison schema/gemma.sql @ 4094:15ab4e474f11
Reverted 4160:419f28898db0 in default.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 25 Jul 2019 18:12:14 +0200 |
parents | 419f28898db0 |
children | b65837b65479 cfa0a5775d70 5af72130b61f |
comparison
equal
deleted
inserted
replaced
4087:1562a5fb36dc | 4094:15ab4e474f11 |
---|---|
824 | 824 |
825 CREATE TABLE imports ( | 825 CREATE TABLE imports ( |
826 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | 826 id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, |
827 state import_state NOT NULL DEFAULT 'queued', | 827 state import_state NOT NULL DEFAULT 'queued', |
828 kind varchar NOT NULL, | 828 kind varchar NOT NULL, |
829 enqueued timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | 829 enqueued timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
830 due timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, | 830 due timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
831 retry_wait interval | 831 retry_wait interval |
832 CHECK(retry_wait IS NULL | 832 CHECK(retry_wait IS NULL |
833 OR retry_wait >= interval '0 microseconds'), | 833 OR retry_wait >= interval '0 microseconds'), |
834 trys_left int, -- if NULL and retry_wait NOT NULL, endless | 834 trys_left int, -- if NULL and retry_wait NOT NULL, endless |
835 username varchar NOT NULL | 835 username varchar NOT NULL |
848 CREATE INDEX enqueued_idx ON imports(enqueued, state) | 848 CREATE INDEX enqueued_idx ON imports(enqueued, state) |
849 | 849 |
850 CREATE TABLE import_logs ( | 850 CREATE TABLE import_logs ( |
851 import_id int NOT NULL REFERENCES imports(id) | 851 import_id int NOT NULL REFERENCES imports(id) |
852 ON DELETE CASCADE, | 852 ON DELETE CASCADE, |
853 time timestamp with time zone NOT NULL DEFAULT now(), | 853 time timestamp zone NOT NULL DEFAULT now(), |
854 kind log_type NOT NULL DEFAULT 'info', | 854 kind log_type NOT NULL DEFAULT 'info', |
855 msg TEXT NOT NULL | 855 msg TEXT NOT NULL |
856 ) | 856 ) |
857 | 857 |
858 CREATE INDEX kind_idx ON import_logs(kind) | 858 CREATE INDEX kind_idx ON import_logs(kind) |