3608 lines
100 KiB
MySQL
3608 lines
100 KiB
MySQL
|
--
|
||
|
-- PostgreSQL database dump
|
||
|
--
|
||
|
|
||
|
-- Dumped from database version 16.2
|
||
|
-- Dumped by pg_dump version 16.2
|
||
|
|
||
|
-- Started on 2024-05-09 15:11:12
|
||
|
CREATE DATABASE keycloak WITH OWNER "postgres";
|
||
|
SET statement_timeout = 0;
|
||
|
SET lock_timeout = 0;
|
||
|
SET idle_in_transaction_session_timeout = 0;
|
||
|
SET client_encoding = 'UTF8';
|
||
|
SET standard_conforming_strings = on;
|
||
|
SELECT pg_catalog.set_config('search_path', '', false);
|
||
|
SET check_function_bodies = false;
|
||
|
SET xmloption = content;
|
||
|
SET client_min_messages = warning;
|
||
|
SET row_security = off;
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4125 (class 1262 OID 63739)
|
||
|
-- Name: opencdmp; Type: DATABASE; Schema: -; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE DATABASE "opencdmp" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.utf8';
|
||
|
|
||
|
|
||
|
\connect -reuse-previous=on "dbname='opencdmp'"
|
||
|
|
||
|
SET statement_timeout = 0;
|
||
|
SET lock_timeout = 0;
|
||
|
SET idle_in_transaction_session_timeout = 0;
|
||
|
SET client_encoding = 'UTF8';
|
||
|
SET standard_conforming_strings = on;
|
||
|
SELECT pg_catalog.set_config('search_path', '', false);
|
||
|
SET check_function_bodies = false;
|
||
|
SET xmloption = content;
|
||
|
SET client_min_messages = warning;
|
||
|
SET row_security = off;
|
||
|
|
||
|
--
|
||
|
-- TOC entry 2 (class 3079 OID 63740)
|
||
|
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4126 (class 0 OID 0)
|
||
|
-- Dependencies: 2
|
||
|
-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 932 (class 1247 OID 63752)
|
||
|
-- Name: doientitytype; Type: TYPE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TYPE public.doientitytype AS ENUM (
|
||
|
'DMP'
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 935 (class 1247 OID 63756)
|
||
|
-- Name: entitytype; Type: TYPE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TYPE public.entitytype AS ENUM (
|
||
|
'DATASET',
|
||
|
'DMP'
|
||
|
);
|
||
|
|
||
|
|
||
|
SET default_table_access_method = heap;
|
||
|
|
||
|
--
|
||
|
-- TOC entry 216 (class 1259 OID 63761)
|
||
|
-- Name: ActionConfirmation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ActionConfirmation" (
|
||
|
id uuid NOT NULL,
|
||
|
type smallint NOT NULL,
|
||
|
status smallint NOT NULL,
|
||
|
token character varying NOT NULL,
|
||
|
data text NOT NULL,
|
||
|
expires_at timestamp without time zone NOT NULL,
|
||
|
created_by uuid NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 217 (class 1259 OID 63766)
|
||
|
-- Name: Content; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Content" (
|
||
|
"Id" uuid NOT NULL,
|
||
|
"Filename" character varying NOT NULL,
|
||
|
"Extension" character varying NOT NULL,
|
||
|
"ParentType" numeric NOT NULL,
|
||
|
"Uri" character varying NOT NULL,
|
||
|
"LocationType" numeric NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 218 (class 1259 OID 63771)
|
||
|
-- Name: Credential; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Credential" (
|
||
|
"Id" uuid NOT NULL,
|
||
|
"Status" numeric NOT NULL,
|
||
|
"Provider" numeric NOT NULL,
|
||
|
"Public" character varying NOT NULL,
|
||
|
"Secret" character varying NOT NULL,
|
||
|
"CreationTime" date NOT NULL,
|
||
|
"LastUpdateTime" date NOT NULL,
|
||
|
"UserId" uuid NOT NULL,
|
||
|
"ExternalId" character varying NOT NULL,
|
||
|
"Email" character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 219 (class 1259 OID 63776)
|
||
|
-- Name: DBVersion; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DBVersion" (
|
||
|
key character varying NOT NULL,
|
||
|
version character varying NOT NULL,
|
||
|
"releasedAt" timestamp with time zone NOT NULL,
|
||
|
"deployedAt" timestamp with time zone,
|
||
|
description text
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 220 (class 1259 OID 63781)
|
||
|
-- Name: DMP; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DMP" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"GroupId" uuid,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"Version" integer NOT NULL,
|
||
|
"Grant" uuid,
|
||
|
"AssociatedDmps" xml,
|
||
|
"Profile" uuid,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Description" text,
|
||
|
"Creator" uuid,
|
||
|
"Properties" text,
|
||
|
"DmpProperties" text,
|
||
|
"FinalizedAt" timestamp(6) with time zone,
|
||
|
"isPublic" boolean DEFAULT false NOT NULL,
|
||
|
"PublishedAt" timestamp(6) with time zone,
|
||
|
"Project" uuid,
|
||
|
"extraProperties" text
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4127 (class 0 OID 0)
|
||
|
-- Dependencies: 220
|
||
|
-- Name: COLUMN "DMP"."AssociatedDmps"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."DMP"."AssociatedDmps" IS 'More data about the DMP as defined by the profile';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 221 (class 1259 OID 63791)
|
||
|
-- Name: DMPDatasetProfile; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DMPDatasetProfile" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
dmp uuid NOT NULL,
|
||
|
datasetprofile uuid NOT NULL,
|
||
|
data text NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 222 (class 1259 OID 63797)
|
||
|
-- Name: DMPOrganisation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DMPOrganisation" (
|
||
|
"DMP" uuid NOT NULL,
|
||
|
"Organisation" uuid NOT NULL,
|
||
|
"Role" integer,
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4128 (class 0 OID 0)
|
||
|
-- Dependencies: 222
|
||
|
-- Name: TABLE "DMPOrganisation"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."DMPOrganisation" IS 'Linking of DMPs to Organisations';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4129 (class 0 OID 0)
|
||
|
-- Dependencies: 222
|
||
|
-- Name: COLUMN "DMPOrganisation"."Role"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."DMPOrganisation"."Role" IS 'Enumerator of roles';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 223 (class 1259 OID 63801)
|
||
|
-- Name: DMPResearcher; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DMPResearcher" (
|
||
|
"DMP" uuid NOT NULL,
|
||
|
"Researcher" uuid NOT NULL,
|
||
|
"Role" integer,
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4130 (class 0 OID 0)
|
||
|
-- Dependencies: 223
|
||
|
-- Name: TABLE "DMPResearcher"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."DMPResearcher" IS 'Linking of DMPs to researchers';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4131 (class 0 OID 0)
|
||
|
-- Dependencies: 223
|
||
|
-- Name: COLUMN "DMPResearcher"."Role"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."DMPResearcher"."Role" IS 'Enumerator of roles';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 224 (class 1259 OID 63805)
|
||
|
-- Name: DataRepository; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DataRepository" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250),
|
||
|
"Abbreviation" character varying(50),
|
||
|
"Reference" character varying,
|
||
|
"Uri" character varying(250),
|
||
|
"Definition" xml,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"CreationUser" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 225 (class 1259 OID 63814)
|
||
|
-- Name: Dataset; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Dataset" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"DMP" uuid,
|
||
|
"Uri" character varying(250),
|
||
|
"Properties" text,
|
||
|
"Profile" uuid,
|
||
|
"Reference" text,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Description" text,
|
||
|
"Creator" uuid,
|
||
|
"FinalizedAt" timestamp(6) with time zone,
|
||
|
"DmpSectionIndex" integer NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4132 (class 0 OID 0)
|
||
|
-- Dependencies: 225
|
||
|
-- Name: COLUMN "Dataset"."Uri"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Dataset"."Uri" IS 'URI of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4133 (class 0 OID 0)
|
||
|
-- Dependencies: 225
|
||
|
-- Name: COLUMN "Dataset"."Properties"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Dataset"."Properties" IS 'More data about the dataset such as Uri, data types etc as defined by the profile';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 226 (class 1259 OID 63823)
|
||
|
-- Name: DatasetDataRepository; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DatasetDataRepository" (
|
||
|
"Dataset" uuid NOT NULL,
|
||
|
"DataRepository" uuid NOT NULL,
|
||
|
"Role" integer,
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Data" character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4134 (class 0 OID 0)
|
||
|
-- Dependencies: 226
|
||
|
-- Name: TABLE "DatasetDataRepository"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."DatasetDataRepository" IS 'Linking Dataset to DataRepository';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 227 (class 1259 OID 63829)
|
||
|
-- Name: DatasetExternalDataset; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DatasetExternalDataset" (
|
||
|
"Id" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Dataset" uuid NOT NULL,
|
||
|
"ExternalDataset" uuid NOT NULL,
|
||
|
"Role" numeric,
|
||
|
"Data" character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 228 (class 1259 OID 63835)
|
||
|
-- Name: DatasetRegistry; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DatasetRegistry" (
|
||
|
"Dataset" uuid NOT NULL,
|
||
|
"Registry" uuid NOT NULL,
|
||
|
"Role" integer,
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Data" character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4135 (class 0 OID 0)
|
||
|
-- Dependencies: 228
|
||
|
-- Name: TABLE "DatasetRegistry"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."DatasetRegistry" IS 'Linking Dataset to Registry';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 229 (class 1259 OID 63841)
|
||
|
-- Name: DatasetService; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DatasetService" (
|
||
|
"Dataset" uuid NOT NULL,
|
||
|
"Service" uuid NOT NULL,
|
||
|
"Role" integer,
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Data" character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4136 (class 0 OID 0)
|
||
|
-- Dependencies: 229
|
||
|
-- Name: TABLE "DatasetService"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."DatasetService" IS 'Linking Dataset to Service';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 230 (class 1259 OID 63847)
|
||
|
-- Name: Description; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Description" (
|
||
|
id uuid NOT NULL,
|
||
|
label character varying(250) NOT NULL,
|
||
|
dmp uuid NOT NULL,
|
||
|
properties text,
|
||
|
status smallint DEFAULT 0 NOT NULL,
|
||
|
description text,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
finalized_at timestamp without time zone,
|
||
|
description_template uuid NOT NULL,
|
||
|
created_by uuid NOT NULL,
|
||
|
dmp_description_template uuid NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 231 (class 1259 OID 63856)
|
||
|
-- Name: DescriptionReference; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DescriptionReference" (
|
||
|
id uuid NOT NULL,
|
||
|
data text,
|
||
|
description_id uuid NOT NULL,
|
||
|
reference_id uuid NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 232 (class 1259 OID 63864)
|
||
|
-- Name: DescriptionTag; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DescriptionTag" (
|
||
|
id uuid NOT NULL,
|
||
|
description uuid NOT NULL,
|
||
|
tag uuid NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 233 (class 1259 OID 63867)
|
||
|
-- Name: DescriptionTemplate; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DescriptionTemplate" (
|
||
|
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
label character varying(250) NOT NULL,
|
||
|
definition xml NOT NULL,
|
||
|
status smallint DEFAULT 0 NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
description text NOT NULL,
|
||
|
group_id uuid NOT NULL,
|
||
|
version integer NOT NULL,
|
||
|
language character varying NOT NULL,
|
||
|
type uuid NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
version_status smallint NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4137 (class 0 OID 0)
|
||
|
-- Dependencies: 233
|
||
|
-- Name: TABLE "DescriptionTemplate"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."DescriptionTemplate" IS 'Profiles for dmp datasets';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 234 (class 1259 OID 63876)
|
||
|
-- Name: DescriptionTemplateType; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DescriptionTemplateType" (
|
||
|
id uuid NOT NULL,
|
||
|
name character varying(250) NOT NULL,
|
||
|
status smallint DEFAULT 0 NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 235 (class 1259 OID 63880)
|
||
|
-- Name: Dmp; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Dmp" (
|
||
|
id uuid NOT NULL,
|
||
|
label character varying(250) NOT NULL,
|
||
|
version integer NOT NULL,
|
||
|
status smallint DEFAULT 0 NOT NULL,
|
||
|
properties text,
|
||
|
group_id uuid NOT NULL,
|
||
|
description text,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
finalized_at timestamp without time zone,
|
||
|
creator uuid NOT NULL,
|
||
|
blueprint uuid NOT NULL,
|
||
|
language character varying(100),
|
||
|
access_type smallint,
|
||
|
public_after timestamp without time zone,
|
||
|
version_status smallint DEFAULT 1 NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 236 (class 1259 OID 63890)
|
||
|
-- Name: DmpBlueprint; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DmpBlueprint" (
|
||
|
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
label character varying(250) NOT NULL,
|
||
|
definition xml,
|
||
|
status smallint DEFAULT 0 NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
tenant uuid,
|
||
|
group_id uuid NOT NULL,
|
||
|
version integer NOT NULL,
|
||
|
version_status smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 237 (class 1259 OID 63899)
|
||
|
-- Name: DmpDescriptionTemplate; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DmpDescriptionTemplate" (
|
||
|
id uuid NOT NULL,
|
||
|
dmp uuid NOT NULL,
|
||
|
description_template_group uuid NOT NULL,
|
||
|
section_id uuid NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 238 (class 1259 OID 63905)
|
||
|
-- Name: DmpReference; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DmpReference" (
|
||
|
id uuid NOT NULL,
|
||
|
dmp_id uuid NOT NULL,
|
||
|
reference_id uuid NOT NULL,
|
||
|
data text,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 239 (class 1259 OID 63913)
|
||
|
-- Name: DmpUser; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DmpUser" (
|
||
|
id uuid NOT NULL,
|
||
|
dmp uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
role smallint DEFAULT 0 NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
tenant uuid,
|
||
|
section_id uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 240 (class 1259 OID 63920)
|
||
|
-- Name: DoiFunder; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."DoiFunder" (
|
||
|
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
name character varying,
|
||
|
doi character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 241 (class 1259 OID 63926)
|
||
|
-- Name: EmailConfirmation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."EmailConfirmation" (
|
||
|
"ID" uuid NOT NULL,
|
||
|
email character varying NOT NULL,
|
||
|
"isConfirmed" boolean NOT NULL,
|
||
|
token uuid NOT NULL,
|
||
|
"userId" uuid NOT NULL,
|
||
|
"expiresAt" timestamp(4) with time zone NOT NULL,
|
||
|
data text
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 242 (class 1259 OID 63931)
|
||
|
-- Name: EntityDoi; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."EntityDoi" (
|
||
|
id uuid NOT NULL,
|
||
|
repository_id character varying(150) NOT NULL,
|
||
|
doi character varying(50) NOT NULL,
|
||
|
created_at timestamp(6) with time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp(6) with time zone DEFAULT now() NOT NULL,
|
||
|
entity_id uuid NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
tenant uuid,
|
||
|
entity_type smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 243 (class 1259 OID 63937)
|
||
|
-- Name: ExternalDataset; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ExternalDataset" (
|
||
|
"Id" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying NOT NULL,
|
||
|
"Abbreviation" character varying,
|
||
|
"Reference" character varying NOT NULL,
|
||
|
"Created" date NOT NULL,
|
||
|
"Modified" date NOT NULL,
|
||
|
"CreationUser" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 244 (class 1259 OID 63943)
|
||
|
-- Name: FileUpload; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."FileUpload" (
|
||
|
"ID" uuid NOT NULL,
|
||
|
"Name" character varying(250) NOT NULL,
|
||
|
"FileType" character varying(50) NOT NULL,
|
||
|
"EntityId" uuid NOT NULL,
|
||
|
"EntityType" public.entitytype NOT NULL,
|
||
|
"CreatedAt" timestamp(6) with time zone DEFAULT now() NOT NULL,
|
||
|
"IsDeleted" boolean DEFAULT false NOT NULL,
|
||
|
"Creator" uuid NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 245 (class 1259 OID 63948)
|
||
|
-- Name: Funder; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Funder" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"Reference" character varying,
|
||
|
"Definition" character varying,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp(4) with time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp(4) with time zone DEFAULT now() NOT NULL,
|
||
|
"Type" numeric DEFAULT 0 NOT NULL,
|
||
|
"CreationUser" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 246 (class 1259 OID 63958)
|
||
|
-- Name: Grant; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Grant" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"Abbreviation" character varying(50),
|
||
|
"Reference" character varying,
|
||
|
"Uri" character varying(250),
|
||
|
"Definition" character varying,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"StartDate" timestamp without time zone,
|
||
|
"EndDate" timestamp without time zone,
|
||
|
"Description" text,
|
||
|
"CreationUser" uuid DEFAULT '332ffc36-bd51-4d4e-bf9a-ffb01fdee05a'::uuid,
|
||
|
"Type" numeric DEFAULT 0 NOT NULL,
|
||
|
"Content" uuid,
|
||
|
"Funder" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4138 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: TABLE "Grant"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."Grant" IS 'Table of project managed in the system';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4139 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: COLUMN "Grant"."ID"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Grant"."ID" IS 'Unique identifier and primary key of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4140 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: COLUMN "Grant"."Label"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Grant"."Label" IS 'A human readable long label of the item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4141 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: COLUMN "Grant"."Abbreviation"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Grant"."Abbreviation" IS 'A human readable abbreviation of the item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4142 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: COLUMN "Grant"."Reference"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Grant"."Reference" IS 'Additional reference data for the item along with information to allow how the item reached the system (e.g. via an external vocabulary)';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4143 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: COLUMN "Grant"."Uri"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Grant"."Uri" IS 'URI of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4144 (class 0 OID 0)
|
||
|
-- Dependencies: 246
|
||
|
-- Name: COLUMN "Grant"."Definition"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Grant"."Definition" IS 'More data about the project such as web site, start/stop, etc';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 247 (class 1259 OID 63969)
|
||
|
-- Name: Invitation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Invitation" (
|
||
|
"Id" uuid NOT NULL,
|
||
|
"InvitationEmail" character varying NOT NULL,
|
||
|
"Token" uuid NOT NULL,
|
||
|
"CreationUser" uuid NOT NULL,
|
||
|
"Dmp" uuid NOT NULL,
|
||
|
"Properties" xml,
|
||
|
"AcceptedInvitation" boolean
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 248 (class 1259 OID 63974)
|
||
|
-- Name: Language; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Language" (
|
||
|
id uuid NOT NULL,
|
||
|
code character varying(20) NOT NULL,
|
||
|
payload text,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
ordinal integer NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 249 (class 1259 OID 63979)
|
||
|
-- Name: Lock; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Lock" (
|
||
|
id uuid NOT NULL,
|
||
|
target uuid NOT NULL,
|
||
|
target_type smallint NOT NULL,
|
||
|
locked_by uuid NOT NULL,
|
||
|
locked_at timestamp without time zone NOT NULL,
|
||
|
touched_at timestamp without time zone,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 250 (class 1259 OID 63982)
|
||
|
-- Name: NotificationLegacy; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."NotificationLegacy" (
|
||
|
id uuid NOT NULL,
|
||
|
"UserId" uuid,
|
||
|
"IsActive" integer NOT NULL,
|
||
|
"Type" integer NOT NULL,
|
||
|
"ContactTypeHint" integer,
|
||
|
"ContactHint" character varying,
|
||
|
"Data" character varying,
|
||
|
"NotifyState" integer NOT NULL,
|
||
|
"NotifiedAt" timestamp without time zone,
|
||
|
"RetryCount" integer,
|
||
|
"CreatedAt" timestamp without time zone,
|
||
|
"UpdatedAt" timestamp without time zone
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 251 (class 1259 OID 63987)
|
||
|
-- Name: Organisation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Organisation" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"Abbreviation" character varying(50),
|
||
|
"Reference" character varying,
|
||
|
"Uri" character varying(250),
|
||
|
"Definition" xml,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4145 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: TABLE "Organisation"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."Organisation" IS 'Table of organizations utilized in the project';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4146 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: COLUMN "Organisation"."ID"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Organisation"."ID" IS 'Unique identifier and primary key of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4147 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: COLUMN "Organisation"."Label"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Organisation"."Label" IS 'A human readable long label of the item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4148 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: COLUMN "Organisation"."Abbreviation"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Organisation"."Abbreviation" IS 'A human readable abbreviation of the item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4149 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: COLUMN "Organisation"."Reference"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Organisation"."Reference" IS 'Reference to the URI of the item along with information to allow how the item reached the system (e.g. via an external vocabulary)';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4150 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: COLUMN "Organisation"."Uri"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Organisation"."Uri" IS 'URI of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4151 (class 0 OID 0)
|
||
|
-- Dependencies: 251
|
||
|
-- Name: COLUMN "Organisation"."Definition"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Organisation"."Definition" IS 'More data about the Organisation such as web site, type etc';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 252 (class 1259 OID 63996)
|
||
|
-- Name: PrefillingSource; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."PrefillingSource" (
|
||
|
id uuid NOT NULL,
|
||
|
label character varying(250) NOT NULL,
|
||
|
definition xml NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 253 (class 1259 OID 64001)
|
||
|
-- Name: Project; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Project" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"Abbreviation" character varying(50),
|
||
|
"Reference" character varying,
|
||
|
"Uri" character varying(250),
|
||
|
"Definition" character varying,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp(4) with time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp(4) with time zone DEFAULT now() NOT NULL,
|
||
|
"StartDate" timestamp(4) with time zone,
|
||
|
"EndDate" timestamp(4) with time zone,
|
||
|
"Description" text,
|
||
|
"CreationUser" uuid,
|
||
|
"Type" numeric DEFAULT 0 NOT NULL,
|
||
|
"Content" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 254 (class 1259 OID 64011)
|
||
|
-- Name: QueueInbox; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."QueueInbox" (
|
||
|
id uuid NOT NULL,
|
||
|
queue character varying(200) NOT NULL,
|
||
|
exchange character varying(200) NOT NULL,
|
||
|
route character varying(200) NOT NULL,
|
||
|
application_id character varying(100) NOT NULL,
|
||
|
message_id uuid NOT NULL,
|
||
|
message json NOT NULL,
|
||
|
retry_count integer,
|
||
|
status smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 255 (class 1259 OID 64016)
|
||
|
-- Name: QueueOutbox; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."QueueOutbox" (
|
||
|
id uuid NOT NULL,
|
||
|
exchange character varying(200) NOT NULL,
|
||
|
route character varying(200) NOT NULL,
|
||
|
message_id uuid NOT NULL,
|
||
|
notify_status smallint NOT NULL,
|
||
|
retry_count integer NOT NULL,
|
||
|
published_at timestamp without time zone,
|
||
|
confirmed_at timestamp without time zone,
|
||
|
tenant uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
message text NOT NULL,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 256 (class 1259 OID 64021)
|
||
|
-- Name: Reference; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Reference" (
|
||
|
id uuid NOT NULL,
|
||
|
label character varying(1024) NOT NULL,
|
||
|
description text,
|
||
|
abbreviation character varying(50),
|
||
|
source character varying(1024),
|
||
|
is_active smallint NOT NULL,
|
||
|
created_by uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
type uuid NOT NULL,
|
||
|
definition character varying,
|
||
|
reference character varying(1024) NOT NULL,
|
||
|
source_type smallint NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 257 (class 1259 OID 64026)
|
||
|
-- Name: ReferenceType; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ReferenceType" (
|
||
|
id uuid NOT NULL,
|
||
|
name character varying(250) NOT NULL,
|
||
|
code character varying(100) NOT NULL,
|
||
|
definition character varying NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 258 (class 1259 OID 64031)
|
||
|
-- Name: Registry; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Registry" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250),
|
||
|
"Abbreviation" character varying(50),
|
||
|
"Reference" character varying,
|
||
|
"Uri" character varying(250),
|
||
|
"Definition" xml,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"CreationUser" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 259 (class 1259 OID 64040)
|
||
|
-- Name: Researcher; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Researcher" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250) NOT NULL,
|
||
|
"Uri" character varying(250),
|
||
|
"PrimaryEmail" character varying(250),
|
||
|
"Definition" xml,
|
||
|
"Reference" character varying,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"CreationUser" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4152 (class 0 OID 0)
|
||
|
-- Dependencies: 259
|
||
|
-- Name: TABLE "Researcher"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON TABLE public."Researcher" IS 'Table of Researcher managed in the system';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4153 (class 0 OID 0)
|
||
|
-- Dependencies: 259
|
||
|
-- Name: COLUMN "Researcher"."ID"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Researcher"."ID" IS 'Unique identifier and primary key of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4154 (class 0 OID 0)
|
||
|
-- Dependencies: 259
|
||
|
-- Name: COLUMN "Researcher"."Label"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Researcher"."Label" IS 'Full name of the researcher (as presented by the system, and composed automatically by data or provided by the reference service)';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4155 (class 0 OID 0)
|
||
|
-- Dependencies: 259
|
||
|
-- Name: COLUMN "Researcher"."Uri"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Researcher"."Uri" IS 'URI of item';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4156 (class 0 OID 0)
|
||
|
-- Dependencies: 259
|
||
|
-- Name: COLUMN "Researcher"."Definition"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Researcher"."Definition" IS 'More data about the researcher such as: email addresses, affiliations etc';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4157 (class 0 OID 0)
|
||
|
-- Dependencies: 259
|
||
|
-- Name: COLUMN "Researcher"."Reference"; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."Researcher"."Reference" IS 'Additional reference data for the item along with information to allow how the item reached the system (e.g. via an external vocabulary)';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 260 (class 1259 OID 64049)
|
||
|
-- Name: Service; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Service" (
|
||
|
"ID" uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"Label" character varying(250),
|
||
|
"Abbreviation" character varying(50),
|
||
|
"Reference" character varying,
|
||
|
"Uri" character varying(250),
|
||
|
"Definition" xml,
|
||
|
"Status" smallint DEFAULT 0 NOT NULL,
|
||
|
"Created" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"Modified" timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
"CreationUser" uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 261 (class 1259 OID 64058)
|
||
|
-- Name: StorageFile; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."StorageFile" (
|
||
|
id uuid NOT NULL,
|
||
|
file_ref character varying(100) NOT NULL,
|
||
|
name character varying(250) NOT NULL,
|
||
|
extension character varying(10) NOT NULL,
|
||
|
mime_type character varying(200) NOT NULL,
|
||
|
storage_type smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
purge_at timestamp without time zone,
|
||
|
purged_at timestamp without time zone,
|
||
|
owner uuid,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 262 (class 1259 OID 64063)
|
||
|
-- Name: SupportiveMaterial; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."SupportiveMaterial" (
|
||
|
id uuid NOT NULL,
|
||
|
type smallint NOT NULL,
|
||
|
language_code character varying(20) NOT NULL,
|
||
|
payload character varying NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 263 (class 1259 OID 64068)
|
||
|
-- Name: Tag; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Tag" (
|
||
|
id uuid NOT NULL,
|
||
|
label character varying(1024) NOT NULL,
|
||
|
created_by uuid,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 264 (class 1259 OID 64073)
|
||
|
-- Name: Tenant; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."Tenant" (
|
||
|
id uuid NOT NULL,
|
||
|
name character varying(200) NOT NULL,
|
||
|
code character varying(500) NOT NULL,
|
||
|
description character varying NOT NULL,
|
||
|
config text,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 265 (class 1259 OID 64078)
|
||
|
-- Name: TenantConfiguration; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."TenantConfiguration" (
|
||
|
id uuid NOT NULL,
|
||
|
value character varying NOT NULL,
|
||
|
type smallint NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 266 (class 1259 OID 64083)
|
||
|
-- Name: TenantUser; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."TenantUser" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
tenant uuid NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 267 (class 1259 OID 64086)
|
||
|
-- Name: User; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."User" (
|
||
|
id uuid NOT NULL,
|
||
|
name character varying(250),
|
||
|
additional_info character varying,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 268 (class 1259 OID 64091)
|
||
|
-- Name: UserAssociation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserAssociation" (
|
||
|
id uuid NOT NULL,
|
||
|
"firstUser" uuid NOT NULL,
|
||
|
"secondUser" uuid NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 269 (class 1259 OID 64094)
|
||
|
-- Name: UserContactInfo; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserContactInfo" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
ordinal integer DEFAULT 0 NOT NULL,
|
||
|
type smallint NOT NULL,
|
||
|
value character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 270 (class 1259 OID 64100)
|
||
|
-- Name: UserCredential; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserCredential" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
data character varying,
|
||
|
external_id character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 271 (class 1259 OID 64105)
|
||
|
-- Name: UserDMP; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserDMP" (
|
||
|
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
usr uuid NOT NULL,
|
||
|
dmp uuid NOT NULL,
|
||
|
role integer
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 272 (class 1259 OID 64109)
|
||
|
-- Name: UserDescriptionTemplate; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserDescriptionTemplate" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
description_template uuid NOT NULL,
|
||
|
role smallint NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 273 (class 1259 OID 64112)
|
||
|
-- Name: UserInfo; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserInfo" (
|
||
|
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
email character varying(250),
|
||
|
authorization_level smallint NOT NULL,
|
||
|
usertype smallint NOT NULL,
|
||
|
verified_email boolean,
|
||
|
name character varying(250),
|
||
|
created timestamp without time zone,
|
||
|
lastloggedin timestamp without time zone,
|
||
|
additionalinfo json,
|
||
|
userstatus smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4158 (class 0 OID 0)
|
||
|
-- Dependencies: 273
|
||
|
-- Name: COLUMN "UserInfo".authorization_level; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."UserInfo".authorization_level IS 'This stores the authorization level of the user: 0 admin, 1 user, being able to be extended furthermore';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 4159 (class 0 OID 0)
|
||
|
-- Dependencies: 273
|
||
|
-- Name: COLUMN "UserInfo".usertype; Type: COMMENT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
COMMENT ON COLUMN public."UserInfo".usertype IS 'This stores the type of user: 0 -> internal, 1 external';
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 274 (class 1259 OID 64118)
|
||
|
-- Name: UserRole; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserRole" (
|
||
|
id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
role character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 275 (class 1259 OID 64124)
|
||
|
-- Name: UserSettings; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserSettings" (
|
||
|
id uuid NOT NULL,
|
||
|
key character varying(500) NOT NULL,
|
||
|
entity_id uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
type character varying(200) NOT NULL,
|
||
|
value text NOT NULL,
|
||
|
name character varying(500) NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 276 (class 1259 OID 64129)
|
||
|
-- Name: UserToken; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."UserToken" (
|
||
|
"Token" uuid NOT NULL,
|
||
|
"UserId" uuid NOT NULL,
|
||
|
"IssuedAt" date NOT NULL,
|
||
|
"ExpiresAt" date NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 277 (class 1259 OID 64132)
|
||
|
-- Name: ant_Annotation; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_Annotation" (
|
||
|
id uuid NOT NULL,
|
||
|
entity_id uuid NOT NULL,
|
||
|
entity_type character varying(512) NOT NULL,
|
||
|
anchor character varying(512),
|
||
|
payload text,
|
||
|
tenant uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
subject_id uuid NOT NULL,
|
||
|
thread_id uuid,
|
||
|
parent_id uuid,
|
||
|
protection_type smallint NOT NULL,
|
||
|
time_stamp timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 278 (class 1259 OID 64137)
|
||
|
-- Name: ant_EntityUser; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_EntityUser" (
|
||
|
id uuid NOT NULL,
|
||
|
entity_id uuid NOT NULL,
|
||
|
user_id uuid NOT NULL,
|
||
|
tenant uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 279 (class 1259 OID 64140)
|
||
|
-- Name: ant_QueueInbox; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_QueueInbox" (
|
||
|
id uuid NOT NULL,
|
||
|
queue character varying(200) NOT NULL,
|
||
|
exchange character varying(200) NOT NULL,
|
||
|
route character varying(200) NOT NULL,
|
||
|
application_id character varying(100) NOT NULL,
|
||
|
message_id uuid NOT NULL,
|
||
|
message json NOT NULL,
|
||
|
retry_count integer,
|
||
|
status smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 280 (class 1259 OID 64145)
|
||
|
-- Name: ant_QueueOutbox; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_QueueOutbox" (
|
||
|
id uuid NOT NULL,
|
||
|
exchange character varying(200) NOT NULL,
|
||
|
route character varying(200) NOT NULL,
|
||
|
message_id uuid NOT NULL,
|
||
|
notify_status smallint NOT NULL,
|
||
|
retry_count integer NOT NULL,
|
||
|
published_at timestamp without time zone,
|
||
|
confirmed_at timestamp without time zone,
|
||
|
tenant uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
message text NOT NULL,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 281 (class 1259 OID 64150)
|
||
|
-- Name: ant_Tenant; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_Tenant" (
|
||
|
id uuid NOT NULL,
|
||
|
code character varying(200) NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 282 (class 1259 OID 64156)
|
||
|
-- Name: ant_TenantUser; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_TenantUser" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
tenant uuid NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 283 (class 1259 OID 64159)
|
||
|
-- Name: ant_User; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_User" (
|
||
|
id uuid NOT NULL,
|
||
|
name character varying(250),
|
||
|
additional_info character varying,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 284 (class 1259 OID 64167)
|
||
|
-- Name: ant_UserContactInfo; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_UserContactInfo" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
ordinal integer DEFAULT 0 NOT NULL,
|
||
|
type smallint NOT NULL,
|
||
|
value character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 285 (class 1259 OID 64174)
|
||
|
-- Name: ant_UserCredential; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ant_UserCredential" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
external_id character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
data character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 286 (class 1259 OID 64180)
|
||
|
-- Name: ntf_InAppNotification; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_InAppNotification" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
type uuid NOT NULL,
|
||
|
read_time timestamp without time zone,
|
||
|
tracking_state smallint NOT NULL,
|
||
|
priority smallint NOT NULL,
|
||
|
subject character varying,
|
||
|
body character varying,
|
||
|
extra_data character varying,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 287 (class 1259 OID 64185)
|
||
|
-- Name: ntf_Notification; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_Notification" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid,
|
||
|
tenant uuid,
|
||
|
type uuid,
|
||
|
contact_hint character varying(200),
|
||
|
notified_at timestamp without time zone,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
data text,
|
||
|
retry_count integer,
|
||
|
tracking_data text,
|
||
|
provenance_ref character varying(200),
|
||
|
tracking_state smallint NOT NULL,
|
||
|
tracking_process smallint NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
contact_type_hint smallint,
|
||
|
notify_state smallint,
|
||
|
notified_with smallint
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 288 (class 1259 OID 64190)
|
||
|
-- Name: ntf_NotificationTemplate; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_NotificationTemplate" (
|
||
|
id uuid NOT NULL,
|
||
|
channel smallint NOT NULL,
|
||
|
notification_type uuid NOT NULL,
|
||
|
kind smallint NOT NULL,
|
||
|
language_code character varying(200) NOT NULL,
|
||
|
value text NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 289 (class 1259 OID 64195)
|
||
|
-- Name: ntf_QueueInbox; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_QueueInbox" (
|
||
|
id uuid NOT NULL,
|
||
|
queue character varying(200) NOT NULL,
|
||
|
exchange character varying(200) NOT NULL,
|
||
|
route character varying(200) NOT NULL,
|
||
|
application_id character varying(100) NOT NULL,
|
||
|
message_id uuid NOT NULL,
|
||
|
message json NOT NULL,
|
||
|
retry_count integer,
|
||
|
status smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
tenant uuid,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 290 (class 1259 OID 64200)
|
||
|
-- Name: ntf_QueueOutbox; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_QueueOutbox" (
|
||
|
id uuid NOT NULL,
|
||
|
exchange character varying(200) NOT NULL,
|
||
|
route character varying(200) NOT NULL,
|
||
|
message_id uuid NOT NULL,
|
||
|
notify_status smallint NOT NULL,
|
||
|
retry_count integer NOT NULL,
|
||
|
published_at timestamp without time zone,
|
||
|
confirmed_at timestamp without time zone,
|
||
|
tenant uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
message text NOT NULL,
|
||
|
is_active smallint NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 291 (class 1259 OID 64205)
|
||
|
-- Name: ntf_Tenant; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_Tenant" (
|
||
|
id uuid NOT NULL,
|
||
|
code character varying(200) NOT NULL,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 292 (class 1259 OID 64211)
|
||
|
-- Name: ntf_TenantConfiguration; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_TenantConfiguration" (
|
||
|
id uuid NOT NULL,
|
||
|
tenant uuid,
|
||
|
type smallint NOT NULL,
|
||
|
value character varying NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 293 (class 1259 OID 64216)
|
||
|
-- Name: ntf_TenantUser; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_TenantUser" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
tenant uuid NOT NULL,
|
||
|
is_active smallint NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 294 (class 1259 OID 64219)
|
||
|
-- Name: ntf_User; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_User" (
|
||
|
id uuid NOT NULL,
|
||
|
name character varying(250),
|
||
|
additional_info character varying,
|
||
|
created_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
updated_at timestamp without time zone DEFAULT now() NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 295 (class 1259 OID 64227)
|
||
|
-- Name: ntf_UserContactInfo; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_UserContactInfo" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
ordinal integer DEFAULT 0 NOT NULL,
|
||
|
type smallint NOT NULL,
|
||
|
value character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 296 (class 1259 OID 64234)
|
||
|
-- Name: ntf_UserCredential; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_UserCredential" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
external_id character varying(512) NOT NULL,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL,
|
||
|
data character varying
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 297 (class 1259 OID 64240)
|
||
|
-- Name: ntf_UserNotificationPreference; Type: TABLE; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE TABLE public."ntf_UserNotificationPreference" (
|
||
|
id uuid NOT NULL,
|
||
|
"user" uuid NOT NULL,
|
||
|
type uuid NOT NULL,
|
||
|
channel smallint NOT NULL,
|
||
|
ordinal numeric NOT NULL,
|
||
|
tenant uuid,
|
||
|
created_at timestamp without time zone NOT NULL,
|
||
|
updated_at timestamp without time zone NOT NULL,
|
||
|
is_active smallint DEFAULT 1 NOT NULL
|
||
|
);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3700 (class 2606 OID 73494)
|
||
|
-- Name: ActionConfirmation ActionConfirmation_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ActionConfirmation"
|
||
|
ADD CONSTRAINT "ActionConfirmation_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3702 (class 2606 OID 73496)
|
||
|
-- Name: Content Content_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Content"
|
||
|
ADD CONSTRAINT "Content_pkey" PRIMARY KEY ("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3704 (class 2606 OID 73498)
|
||
|
-- Name: Credential Credential_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Credential"
|
||
|
ADD CONSTRAINT "Credential_pkey" PRIMARY KEY ("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3709 (class 2606 OID 73500)
|
||
|
-- Name: DMPDatasetProfile DMPDatasetProfile_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPDatasetProfile"
|
||
|
ADD CONSTRAINT "DMPDatasetProfile_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3740 (class 2606 OID 73502)
|
||
|
-- Name: DmpBlueprint DMPPRofile_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpBlueprint"
|
||
|
ADD CONSTRAINT "DMPPRofile_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3706 (class 2606 OID 73504)
|
||
|
-- Name: DMP DMP_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMP"
|
||
|
ADD CONSTRAINT "DMP_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3720 (class 2606 OID 73506)
|
||
|
-- Name: DatasetDataRepository DatasetDataRepository_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetDataRepository"
|
||
|
ADD CONSTRAINT "DatasetDataRepository_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3722 (class 2606 OID 73508)
|
||
|
-- Name: DatasetExternalDataset DatasetExternalDataset_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetExternalDataset"
|
||
|
ADD CONSTRAINT "DatasetExternalDataset_pkey" PRIMARY KEY ("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3734 (class 2606 OID 73510)
|
||
|
-- Name: DescriptionTemplate DatasetProfile_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTemplate"
|
||
|
ADD CONSTRAINT "DatasetProfile_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3724 (class 2606 OID 73512)
|
||
|
-- Name: DatasetRegistry DatasetRegistry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetRegistry"
|
||
|
ADD CONSTRAINT "DatasetRegistry_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3726 (class 2606 OID 73514)
|
||
|
-- Name: DatasetService DatasetService_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetService"
|
||
|
ADD CONSTRAINT "DatasetService_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3717 (class 2606 OID 73516)
|
||
|
-- Name: Dataset Dataset_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dataset"
|
||
|
ADD CONSTRAINT "Dataset_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3730 (class 2606 OID 73518)
|
||
|
-- Name: DescriptionReference DescriptionReference_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionReference"
|
||
|
ADD CONSTRAINT "DescriptionReference_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3732 (class 2606 OID 73520)
|
||
|
-- Name: DescriptionTag DescriptionTag_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTag"
|
||
|
ADD CONSTRAINT "DescriptionTag_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3736 (class 2606 OID 73522)
|
||
|
-- Name: DescriptionTemplateType DescriptionTemplateType_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTemplateType"
|
||
|
ADD CONSTRAINT "DescriptionTemplateType_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3728 (class 2606 OID 73524)
|
||
|
-- Name: Description Description_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Description"
|
||
|
ADD CONSTRAINT "Description_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3742 (class 2606 OID 73526)
|
||
|
-- Name: DmpDescriptionTemplate DmpDescriptionTemplate_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpDescriptionTemplate"
|
||
|
ADD CONSTRAINT "DmpDescriptionTemplate_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3744 (class 2606 OID 73528)
|
||
|
-- Name: DmpReference DmpReference_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpReference"
|
||
|
ADD CONSTRAINT "DmpReference_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3746 (class 2606 OID 73530)
|
||
|
-- Name: DmpUser DmpUser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpUser"
|
||
|
ADD CONSTRAINT "DmpUser_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3738 (class 2606 OID 73532)
|
||
|
-- Name: Dmp Dmp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dmp"
|
||
|
ADD CONSTRAINT "Dmp_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3748 (class 2606 OID 73534)
|
||
|
-- Name: DoiFunder DoiFunder_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DoiFunder"
|
||
|
ADD CONSTRAINT "DoiFunder_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3752 (class 2606 OID 73536)
|
||
|
-- Name: EntityDoi Doi_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."EntityDoi"
|
||
|
ADD CONSTRAINT "Doi_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3754 (class 2606 OID 73538)
|
||
|
-- Name: ExternalDataset ExternalDataset_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ExternalDataset"
|
||
|
ADD CONSTRAINT "ExternalDataset_pkey" PRIMARY KEY ("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3756 (class 2606 OID 73540)
|
||
|
-- Name: FileUpload File_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."FileUpload"
|
||
|
ADD CONSTRAINT "File_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3758 (class 2606 OID 73542)
|
||
|
-- Name: Funder Funder_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Funder"
|
||
|
ADD CONSTRAINT "Funder_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3760 (class 2606 OID 73544)
|
||
|
-- Name: Grant Grant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Grant"
|
||
|
ADD CONSTRAINT "Grant_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3762 (class 2606 OID 73546)
|
||
|
-- Name: Invitation Invitation_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Invitation"
|
||
|
ADD CONSTRAINT "Invitation_pkey" PRIMARY KEY ("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3764 (class 2606 OID 73548)
|
||
|
-- Name: Language Language_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Language"
|
||
|
ADD CONSTRAINT "Language_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3766 (class 2606 OID 73550)
|
||
|
-- Name: Lock Lock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Lock"
|
||
|
ADD CONSTRAINT "Lock_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3750 (class 2606 OID 73552)
|
||
|
-- Name: EmailConfirmation LoginConfirmationEmail_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."EmailConfirmation"
|
||
|
ADD CONSTRAINT "LoginConfirmationEmail_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3768 (class 2606 OID 73554)
|
||
|
-- Name: NotificationLegacy NotificationLegacy_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."NotificationLegacy"
|
||
|
ADD CONSTRAINT "NotificationLegacy_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3844 (class 2606 OID 73556)
|
||
|
-- Name: ntf_NotificationTemplate NotificationTemplate_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_NotificationTemplate"
|
||
|
ADD CONSTRAINT "NotificationTemplate_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3856 (class 2606 OID 73558)
|
||
|
-- Name: ntf_User Ntf_User_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_User"
|
||
|
ADD CONSTRAINT "Ntf_User_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3770 (class 2606 OID 73560)
|
||
|
-- Name: Organisation Organisation_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Organisation"
|
||
|
ADD CONSTRAINT "Organisation_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3711 (class 2606 OID 73562)
|
||
|
-- Name: DMPOrganisation PKey_DMPOrganisation; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPOrganisation"
|
||
|
ADD CONSTRAINT "PKey_DMPOrganisation" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3713 (class 2606 OID 73564)
|
||
|
-- Name: DMPResearcher PKey_DMPResearcher; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPResearcher"
|
||
|
ADD CONSTRAINT "PKey_DMPResearcher" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3715 (class 2606 OID 73566)
|
||
|
-- Name: DataRepository PKey_DataRepository; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DataRepository"
|
||
|
ADD CONSTRAINT "PKey_DataRepository" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3784 (class 2606 OID 73568)
|
||
|
-- Name: Registry PKey_Registry; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Registry"
|
||
|
ADD CONSTRAINT "PKey_Registry" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3788 (class 2606 OID 73570)
|
||
|
-- Name: Service PKey_Service; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Service"
|
||
|
ADD CONSTRAINT "PKey_Service" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3772 (class 2606 OID 73572)
|
||
|
-- Name: PrefillingSource PrefillingSource_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."PrefillingSource"
|
||
|
ADD CONSTRAINT "PrefillingSource_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3774 (class 2606 OID 73574)
|
||
|
-- Name: Project Project_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Project"
|
||
|
ADD CONSTRAINT "Project_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3776 (class 2606 OID 73576)
|
||
|
-- Name: QueueInbox QueryInbox_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."QueueInbox"
|
||
|
ADD CONSTRAINT "QueryInbox_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3778 (class 2606 OID 73578)
|
||
|
-- Name: QueueOutbox QueueOutbox_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."QueueOutbox"
|
||
|
ADD CONSTRAINT "QueueOutbox_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3782 (class 2606 OID 73580)
|
||
|
-- Name: ReferenceType ReferenceType_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ReferenceType"
|
||
|
ADD CONSTRAINT "ReferenceType_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3780 (class 2606 OID 73582)
|
||
|
-- Name: Reference Reference_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Reference"
|
||
|
ADD CONSTRAINT "Reference_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3786 (class 2606 OID 73584)
|
||
|
-- Name: Researcher Researcher_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Researcher"
|
||
|
ADD CONSTRAINT "Researcher_pkey" PRIMARY KEY ("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3790 (class 2606 OID 73586)
|
||
|
-- Name: StorageFile StorageFile_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."StorageFile"
|
||
|
ADD CONSTRAINT "StorageFile_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3792 (class 2606 OID 73588)
|
||
|
-- Name: SupportiveMaterial SupportiveMaterial_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."SupportiveMaterial"
|
||
|
ADD CONSTRAINT "SupportiveMaterial_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3794 (class 2606 OID 73590)
|
||
|
-- Name: Tag Tag_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Tag"
|
||
|
ADD CONSTRAINT "Tag_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3798 (class 2606 OID 73592)
|
||
|
-- Name: TenantConfiguration TenantConfiguration_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."TenantConfiguration"
|
||
|
ADD CONSTRAINT "TenantConfiguration_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3800 (class 2606 OID 73594)
|
||
|
-- Name: TenantUser TenantUser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."TenantUser"
|
||
|
ADD CONSTRAINT "TenantUser_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3796 (class 2606 OID 73596)
|
||
|
-- Name: Tenant Tenant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Tenant"
|
||
|
ADD CONSTRAINT "Tenant_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3806 (class 2606 OID 73598)
|
||
|
-- Name: UserContactInfo UserContactInfo_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserContactInfo"
|
||
|
ADD CONSTRAINT "UserContactInfo_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3808 (class 2606 OID 73600)
|
||
|
-- Name: UserCredential UserCredential_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserCredential"
|
||
|
ADD CONSTRAINT "UserCredential_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3810 (class 2606 OID 73602)
|
||
|
-- Name: UserDescriptionTemplate UserDatasetProfile_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserDescriptionTemplate"
|
||
|
ADD CONSTRAINT "UserDatasetProfile_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3812 (class 2606 OID 73604)
|
||
|
-- Name: UserInfo UserInfo_email_key; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserInfo"
|
||
|
ADD CONSTRAINT "UserInfo_email_key" UNIQUE (email);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3814 (class 2606 OID 73606)
|
||
|
-- Name: UserInfo UserInfo_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserInfo"
|
||
|
ADD CONSTRAINT "UserInfo_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3816 (class 2606 OID 73608)
|
||
|
-- Name: UserRole UserRole_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserRole"
|
||
|
ADD CONSTRAINT "UserRole_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3820 (class 2606 OID 73610)
|
||
|
-- Name: UserToken UserToken_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserToken"
|
||
|
ADD CONSTRAINT "UserToken_pkey" PRIMARY KEY ("Token");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3802 (class 2606 OID 73612)
|
||
|
-- Name: User User_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."User"
|
||
|
ADD CONSTRAINT "User_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3822 (class 2606 OID 73614)
|
||
|
-- Name: ant_Annotation ant_Annotation_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_Annotation"
|
||
|
ADD CONSTRAINT "ant_Annotation_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3824 (class 2606 OID 73616)
|
||
|
-- Name: ant_EntityUser ant_EntityUser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_EntityUser"
|
||
|
ADD CONSTRAINT "ant_EntityUser_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3826 (class 2606 OID 73618)
|
||
|
-- Name: ant_QueueInbox ant_QueryInbox_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_QueueInbox"
|
||
|
ADD CONSTRAINT "ant_QueryInbox_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3828 (class 2606 OID 73620)
|
||
|
-- Name: ant_QueueOutbox ant_QueueOutbox_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_QueueOutbox"
|
||
|
ADD CONSTRAINT "ant_QueueOutbox_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3832 (class 2606 OID 73622)
|
||
|
-- Name: ant_TenantUser ant_TenantUser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_TenantUser"
|
||
|
ADD CONSTRAINT "ant_TenantUser_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3830 (class 2606 OID 73624)
|
||
|
-- Name: ant_Tenant ant_Tenant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_Tenant"
|
||
|
ADD CONSTRAINT "ant_Tenant_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3836 (class 2606 OID 73626)
|
||
|
-- Name: ant_UserContactInfo ant_UserContactInfo_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_UserContactInfo"
|
||
|
ADD CONSTRAINT "ant_UserContactInfo_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3838 (class 2606 OID 73628)
|
||
|
-- Name: ant_UserCredential ant_UserCredential_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_UserCredential"
|
||
|
ADD CONSTRAINT "ant_UserCredential_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3834 (class 2606 OID 73630)
|
||
|
-- Name: ant_User ant_User_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_User"
|
||
|
ADD CONSTRAINT "ant_User_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3840 (class 2606 OID 73632)
|
||
|
-- Name: ntf_InAppNotification ntf_InAppNotification_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_InAppNotification"
|
||
|
ADD CONSTRAINT "ntf_InAppNotification_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3842 (class 2606 OID 73634)
|
||
|
-- Name: ntf_Notification ntf_Notification_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_Notification"
|
||
|
ADD CONSTRAINT "ntf_Notification_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3846 (class 2606 OID 73636)
|
||
|
-- Name: ntf_QueueInbox ntf_QueryInbox_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_QueueInbox"
|
||
|
ADD CONSTRAINT "ntf_QueryInbox_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3848 (class 2606 OID 73638)
|
||
|
-- Name: ntf_QueueOutbox ntf_QueueOutbox_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_QueueOutbox"
|
||
|
ADD CONSTRAINT "ntf_QueueOutbox_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3852 (class 2606 OID 73640)
|
||
|
-- Name: ntf_TenantConfiguration ntf_TenantConfguration_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_TenantConfiguration"
|
||
|
ADD CONSTRAINT "ntf_TenantConfguration_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3854 (class 2606 OID 73642)
|
||
|
-- Name: ntf_TenantUser ntf_TenantUser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_TenantUser"
|
||
|
ADD CONSTRAINT "ntf_TenantUser_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3850 (class 2606 OID 73644)
|
||
|
-- Name: ntf_Tenant ntf_Tenant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_Tenant"
|
||
|
ADD CONSTRAINT "ntf_Tenant_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3858 (class 2606 OID 73646)
|
||
|
-- Name: ntf_UserContactInfo ntf_UserContactInfo_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserContactInfo"
|
||
|
ADD CONSTRAINT "ntf_UserContactInfo_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3860 (class 2606 OID 73648)
|
||
|
-- Name: ntf_UserCredential ntf_UserCredential_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserCredential"
|
||
|
ADD CONSTRAINT "ntf_UserCredential_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3862 (class 2606 OID 73650)
|
||
|
-- Name: ntf_UserNotificationPreference ntf_UserNotificationPreference_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserNotificationPreference"
|
||
|
ADD CONSTRAINT "ntf_UserNotificationPreference_pkey" PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3804 (class 2606 OID 73652)
|
||
|
-- Name: UserAssociation pk_user_association; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserAssociation"
|
||
|
ADD CONSTRAINT pk_user_association PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3818 (class 2606 OID 73654)
|
||
|
-- Name: UserSettings user_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserSettings"
|
||
|
ADD CONSTRAINT user_settings_pkey PRIMARY KEY (id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3707 (class 1259 OID 73655)
|
||
|
-- Name: fki_DMPDMPProfileReference; Type: INDEX; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE INDEX "fki_DMPDMPProfileReference" ON public."DMP" USING btree ("Profile");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3718 (class 1259 OID 73656)
|
||
|
-- Name: fki_DatasetDatasetProfileReference; Type: INDEX; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
CREATE INDEX "fki_DatasetDatasetProfileReference" ON public."Dataset" USING btree ("Profile");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3863 (class 2606 OID 73657)
|
||
|
-- Name: ActionConfirmation ActionConfirmation_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ActionConfirmation"
|
||
|
ADD CONSTRAINT "ActionConfirmation_created_by_fkey" FOREIGN KEY (created_by) REFERENCES public."User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3864 (class 2606 OID 73662)
|
||
|
-- Name: ActionConfirmation ActionConfirmation_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ActionConfirmation"
|
||
|
ADD CONSTRAINT "ActionConfirmation_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3865 (class 2606 OID 73667)
|
||
|
-- Name: Credential Credential_UserId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Credential"
|
||
|
ADD CONSTRAINT "Credential_UserId_fkey" FOREIGN KEY ("UserId") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3866 (class 2606 OID 73672)
|
||
|
-- Name: DMP DMPDMPProfileReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMP"
|
||
|
ADD CONSTRAINT "DMPDMPProfileReference" FOREIGN KEY ("Profile") REFERENCES public."DmpBlueprint"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3869 (class 2606 OID 73677)
|
||
|
-- Name: DMPDatasetProfile DMPDatasetProfile_datasetprofile_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPDatasetProfile"
|
||
|
ADD CONSTRAINT "DMPDatasetProfile_datasetprofile_fkey" FOREIGN KEY (datasetprofile) REFERENCES public."DescriptionTemplate"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3870 (class 2606 OID 73682)
|
||
|
-- Name: DMPDatasetProfile DMPDatasetProfile_dmp_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPDatasetProfile"
|
||
|
ADD CONSTRAINT "DMPDatasetProfile_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."DMP"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3871 (class 2606 OID 73687)
|
||
|
-- Name: DMPOrganisation DMPOrganisationDMPReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPOrganisation"
|
||
|
ADD CONSTRAINT "DMPOrganisationDMPReference" FOREIGN KEY ("Organisation") REFERENCES public."Organisation"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3872 (class 2606 OID 73692)
|
||
|
-- Name: DMPOrganisation DMPOrganisationOrganisationReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPOrganisation"
|
||
|
ADD CONSTRAINT "DMPOrganisationOrganisationReference" FOREIGN KEY ("DMP") REFERENCES public."DMP"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3867 (class 2606 OID 73697)
|
||
|
-- Name: DMP DMPProjectReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMP"
|
||
|
ADD CONSTRAINT "DMPProjectReference" FOREIGN KEY ("Grant") REFERENCES public."Grant"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3873 (class 2606 OID 73702)
|
||
|
-- Name: DMPResearcher DMPResearcherDMPReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPResearcher"
|
||
|
ADD CONSTRAINT "DMPResearcherDMPReference" FOREIGN KEY ("Researcher") REFERENCES public."Researcher"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3874 (class 2606 OID 73707)
|
||
|
-- Name: DMPResearcher DMPResearcherResearcherReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMPResearcher"
|
||
|
ADD CONSTRAINT "DMPResearcherResearcherReference" FOREIGN KEY ("DMP") REFERENCES public."DMP"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3868 (class 2606 OID 73712)
|
||
|
-- Name: DMP DMP_Creator_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DMP"
|
||
|
ADD CONSTRAINT "DMP_Creator_fkey" FOREIGN KEY ("Creator") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3875 (class 2606 OID 73717)
|
||
|
-- Name: Dataset DatasetDMPReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dataset"
|
||
|
ADD CONSTRAINT "DatasetDMPReference" FOREIGN KEY ("DMP") REFERENCES public."DMP"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3878 (class 2606 OID 73722)
|
||
|
-- Name: DatasetDataRepository DatasetDataRepositoryDataRepositoryReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetDataRepository"
|
||
|
ADD CONSTRAINT "DatasetDataRepositoryDataRepositoryReference" FOREIGN KEY ("DataRepository") REFERENCES public."DataRepository"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3879 (class 2606 OID 73727)
|
||
|
-- Name: DatasetDataRepository DatasetDataRepositoryDatasetReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetDataRepository"
|
||
|
ADD CONSTRAINT "DatasetDataRepositoryDatasetReference" FOREIGN KEY ("Dataset") REFERENCES public."Dataset"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3876 (class 2606 OID 73732)
|
||
|
-- Name: Dataset DatasetDatasetProfileReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dataset"
|
||
|
ADD CONSTRAINT "DatasetDatasetProfileReference" FOREIGN KEY ("Profile") REFERENCES public."DescriptionTemplate"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3882 (class 2606 OID 73737)
|
||
|
-- Name: DatasetRegistry DatasetRegistryDatasetReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetRegistry"
|
||
|
ADD CONSTRAINT "DatasetRegistryDatasetReference" FOREIGN KEY ("Dataset") REFERENCES public."Dataset"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3883 (class 2606 OID 73742)
|
||
|
-- Name: DatasetRegistry DatasetRegistryRegistryReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetRegistry"
|
||
|
ADD CONSTRAINT "DatasetRegistryRegistryReference" FOREIGN KEY ("Registry") REFERENCES public."Registry"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3884 (class 2606 OID 73747)
|
||
|
-- Name: DatasetService DatasetServiceDatasetReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetService"
|
||
|
ADD CONSTRAINT "DatasetServiceDatasetReference" FOREIGN KEY ("Dataset") REFERENCES public."Dataset"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3885 (class 2606 OID 73752)
|
||
|
-- Name: DatasetService DatasetServiceServiceReference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetService"
|
||
|
ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES public."Service"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3877 (class 2606 OID 73757)
|
||
|
-- Name: Dataset Dataset_Creator_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dataset"
|
||
|
ADD CONSTRAINT "Dataset_Creator_fkey" FOREIGN KEY ("Creator") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3891 (class 2606 OID 73762)
|
||
|
-- Name: DescriptionReference DescriptionReference_description_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionReference"
|
||
|
ADD CONSTRAINT "DescriptionReference_description_fkey" FOREIGN KEY (description_id) REFERENCES public."Description"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3892 (class 2606 OID 73767)
|
||
|
-- Name: DescriptionReference DescriptionReference_reference_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionReference"
|
||
|
ADD CONSTRAINT "DescriptionReference_reference_fkey" FOREIGN KEY (reference_id) REFERENCES public."Reference"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3893 (class 2606 OID 73772)
|
||
|
-- Name: DescriptionReference DescriptionReference_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionReference"
|
||
|
ADD CONSTRAINT "DescriptionReference_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3894 (class 2606 OID 73777)
|
||
|
-- Name: DescriptionTag DescriptionTag_description_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTag"
|
||
|
ADD CONSTRAINT "DescriptionTag_description_fkey" FOREIGN KEY (description) REFERENCES public."Description"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3895 (class 2606 OID 73782)
|
||
|
-- Name: DescriptionTag DescriptionTag_tag_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTag"
|
||
|
ADD CONSTRAINT "DescriptionTag_tag_fkey" FOREIGN KEY (tag) REFERENCES public."Tag"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3896 (class 2606 OID 73787)
|
||
|
-- Name: DescriptionTag DescriptionTag_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTag"
|
||
|
ADD CONSTRAINT "DescriptionTag_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3899 (class 2606 OID 73792)
|
||
|
-- Name: DescriptionTemplateType DescriptionTemplateType_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTemplateType"
|
||
|
ADD CONSTRAINT "DescriptionTemplateType_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3897 (class 2606 OID 73797)
|
||
|
-- Name: DescriptionTemplate DescriptionTemplate_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTemplate"
|
||
|
ADD CONSTRAINT "DescriptionTemplate_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3898 (class 2606 OID 73802)
|
||
|
-- Name: DescriptionTemplate DescriptionTemplate_type_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DescriptionTemplate"
|
||
|
ADD CONSTRAINT "DescriptionTemplate_type_fkey" FOREIGN KEY (type) REFERENCES public."DescriptionTemplateType"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3886 (class 2606 OID 73807)
|
||
|
-- Name: Description Description_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Description"
|
||
|
ADD CONSTRAINT "Description_created_by_fkey" FOREIGN KEY (created_by) REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3887 (class 2606 OID 73812)
|
||
|
-- Name: Description Description_description_template_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Description"
|
||
|
ADD CONSTRAINT "Description_description_template_fkey" FOREIGN KEY (description_template) REFERENCES public."DescriptionTemplate"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3888 (class 2606 OID 73817)
|
||
|
-- Name: Description Description_dmp_description_template_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Description"
|
||
|
ADD CONSTRAINT "Description_dmp_description_template_fkey" FOREIGN KEY (dmp_description_template) REFERENCES public."DmpDescriptionTemplate"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3889 (class 2606 OID 73822)
|
||
|
-- Name: Description Description_dmp_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Description"
|
||
|
ADD CONSTRAINT "Description_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."Dmp"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3890 (class 2606 OID 73827)
|
||
|
-- Name: Description Description_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Description"
|
||
|
ADD CONSTRAINT "Description_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3903 (class 2606 OID 73832)
|
||
|
-- Name: DmpBlueprint DmpBlueprint_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpBlueprint"
|
||
|
ADD CONSTRAINT "DmpBlueprint_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3904 (class 2606 OID 73837)
|
||
|
-- Name: DmpDescriptionTemplate DmpDescriptionTemplate_dmp_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpDescriptionTemplate"
|
||
|
ADD CONSTRAINT "DmpDescriptionTemplate_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."Dmp"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3905 (class 2606 OID 73842)
|
||
|
-- Name: DmpDescriptionTemplate DmpDescriptionTemplate_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpDescriptionTemplate"
|
||
|
ADD CONSTRAINT "DmpDescriptionTemplate_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3906 (class 2606 OID 73847)
|
||
|
-- Name: DmpReference DmpReference_dmp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpReference"
|
||
|
ADD CONSTRAINT "DmpReference_dmp_id_fkey" FOREIGN KEY (dmp_id) REFERENCES public."Dmp"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3907 (class 2606 OID 73852)
|
||
|
-- Name: DmpReference DmpReference_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpReference"
|
||
|
ADD CONSTRAINT "DmpReference_reference_id_fkey" FOREIGN KEY (reference_id) REFERENCES public."Reference"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3908 (class 2606 OID 73857)
|
||
|
-- Name: DmpReference DmpReference_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpReference"
|
||
|
ADD CONSTRAINT "DmpReference_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3909 (class 2606 OID 73862)
|
||
|
-- Name: DmpUser DmpUser_dmp_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpUser"
|
||
|
ADD CONSTRAINT "DmpUser_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."Dmp"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3910 (class 2606 OID 73867)
|
||
|
-- Name: DmpUser DmpUser_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpUser"
|
||
|
ADD CONSTRAINT "DmpUser_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3911 (class 2606 OID 73872)
|
||
|
-- Name: DmpUser DmpUser_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DmpUser"
|
||
|
ADD CONSTRAINT "DmpUser_user_fkey" FOREIGN KEY ("user") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3900 (class 2606 OID 73877)
|
||
|
-- Name: Dmp Dmp_blueprint_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dmp"
|
||
|
ADD CONSTRAINT "Dmp_blueprint_fkey" FOREIGN KEY (blueprint) REFERENCES public."DmpBlueprint"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3901 (class 2606 OID 73882)
|
||
|
-- Name: Dmp Dmp_creator_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dmp"
|
||
|
ADD CONSTRAINT "Dmp_creator_fkey" FOREIGN KEY (creator) REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3902 (class 2606 OID 73887)
|
||
|
-- Name: Dmp Dmp_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Dmp"
|
||
|
ADD CONSTRAINT "Dmp_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3912 (class 2606 OID 73892)
|
||
|
-- Name: EntityDoi EntityDoi_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."EntityDoi"
|
||
|
ADD CONSTRAINT "EntityDoi_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3913 (class 2606 OID 73897)
|
||
|
-- Name: FileUpload FileUpload_Creator_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."FileUpload"
|
||
|
ADD CONSTRAINT "FileUpload_Creator_fkey" FOREIGN KEY ("Creator") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3914 (class 2606 OID 73902)
|
||
|
-- Name: Grant Grant_CreationUser_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Grant"
|
||
|
ADD CONSTRAINT "Grant_CreationUser_fkey" FOREIGN KEY ("CreationUser") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3916 (class 2606 OID 73907)
|
||
|
-- Name: Invitation Invitation_CreationUser_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Invitation"
|
||
|
ADD CONSTRAINT "Invitation_CreationUser_fkey" FOREIGN KEY ("CreationUser") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3918 (class 2606 OID 73912)
|
||
|
-- Name: Language Language_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Language"
|
||
|
ADD CONSTRAINT "Language_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3919 (class 2606 OID 73917)
|
||
|
-- Name: Lock Lock_lockedby_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Lock"
|
||
|
ADD CONSTRAINT "Lock_lockedby_fkey" FOREIGN KEY (locked_by) REFERENCES public."User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3920 (class 2606 OID 73922)
|
||
|
-- Name: Lock Lock_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Lock"
|
||
|
ADD CONSTRAINT "Lock_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3921 (class 2606 OID 73927)
|
||
|
-- Name: NotificationLegacy NotificationLegacy_UserId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."NotificationLegacy"
|
||
|
ADD CONSTRAINT "NotificationLegacy_UserId_fkey" FOREIGN KEY ("UserId") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3967 (class 2606 OID 73932)
|
||
|
-- Name: ntf_NotificationTemplate NotificationTemplate_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_NotificationTemplate"
|
||
|
ADD CONSTRAINT "NotificationTemplate_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3922 (class 2606 OID 73937)
|
||
|
-- Name: PrefillingSource PrefillingSource_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."PrefillingSource"
|
||
|
ADD CONSTRAINT "PrefillingSource_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3923 (class 2606 OID 73942)
|
||
|
-- Name: Project Project_CreationUser_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Project"
|
||
|
ADD CONSTRAINT "Project_CreationUser_fkey" FOREIGN KEY ("CreationUser") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3925 (class 2606 OID 73947)
|
||
|
-- Name: QueueInbox QueryInbox_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."QueueInbox"
|
||
|
ADD CONSTRAINT "QueryInbox_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3926 (class 2606 OID 73952)
|
||
|
-- Name: QueueOutbox QueueOutbox_tennat_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."QueueOutbox"
|
||
|
ADD CONSTRAINT "QueueOutbox_tennat_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3930 (class 2606 OID 73957)
|
||
|
-- Name: ReferenceType ReferenceType_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ReferenceType"
|
||
|
ADD CONSTRAINT "ReferenceType_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3927 (class 2606 OID 73962)
|
||
|
-- Name: Reference Reference_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Reference"
|
||
|
ADD CONSTRAINT "Reference_created_by_fkey" FOREIGN KEY (created_by) REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3928 (class 2606 OID 73967)
|
||
|
-- Name: Reference Reference_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Reference"
|
||
|
ADD CONSTRAINT "Reference_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3929 (class 2606 OID 73972)
|
||
|
-- Name: Reference Reference_type_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Reference"
|
||
|
ADD CONSTRAINT "Reference_type_fkey" FOREIGN KEY (type) REFERENCES public."ReferenceType"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3931 (class 2606 OID 73977)
|
||
|
-- Name: StorageFile StorageFile_owner_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."StorageFile"
|
||
|
ADD CONSTRAINT "StorageFile_owner_fkey" FOREIGN KEY (owner) REFERENCES public."User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3932 (class 2606 OID 73982)
|
||
|
-- Name: StorageFile StorageFile_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."StorageFile"
|
||
|
ADD CONSTRAINT "StorageFile_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3933 (class 2606 OID 73987)
|
||
|
-- Name: SupportiveMaterial SupportiveMaterial_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."SupportiveMaterial"
|
||
|
ADD CONSTRAINT "SupportiveMaterial_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3934 (class 2606 OID 73992)
|
||
|
-- Name: Tag Tag_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Tag"
|
||
|
ADD CONSTRAINT "Tag_created_by_fkey" FOREIGN KEY (created_by) REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3935 (class 2606 OID 73997)
|
||
|
-- Name: Tag Tag_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Tag"
|
||
|
ADD CONSTRAINT "Tag_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3936 (class 2606 OID 74002)
|
||
|
-- Name: TenantConfiguration TenantConfiguration_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."TenantConfiguration"
|
||
|
ADD CONSTRAINT "TenantConfiguration_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3937 (class 2606 OID 74007)
|
||
|
-- Name: TenantUser TenantUser_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."TenantUser"
|
||
|
ADD CONSTRAINT "TenantUser_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3938 (class 2606 OID 74012)
|
||
|
-- Name: TenantUser TenantUser_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."TenantUser"
|
||
|
ADD CONSTRAINT "TenantUser_user_fkey" FOREIGN KEY ("user") REFERENCES public."User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3941 (class 2606 OID 74017)
|
||
|
-- Name: UserContactInfo UserContactInfo_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserContactInfo"
|
||
|
ADD CONSTRAINT "UserContactInfo_user_fkey" FOREIGN KEY ("user") REFERENCES public."User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3942 (class 2606 OID 74022)
|
||
|
-- Name: UserCredential UserCredential_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserCredential"
|
||
|
ADD CONSTRAINT "UserCredential_user_fkey" FOREIGN KEY ("user") REFERENCES public."User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3943 (class 2606 OID 74027)
|
||
|
-- Name: UserDMP UserDMP_dmp_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserDMP"
|
||
|
ADD CONSTRAINT "UserDMP_dmp_fkey" FOREIGN KEY (dmp) REFERENCES public."DMP"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3944 (class 2606 OID 74032)
|
||
|
-- Name: UserDMP UserDMP_usr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserDMP"
|
||
|
ADD CONSTRAINT "UserDMP_usr_fkey" FOREIGN KEY (usr) REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3945 (class 2606 OID 74037)
|
||
|
-- Name: UserDescriptionTemplate UserDatasetProfile_datasetProfile_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserDescriptionTemplate"
|
||
|
ADD CONSTRAINT "UserDatasetProfile_datasetProfile_fkey" FOREIGN KEY (description_template) REFERENCES public."DescriptionTemplate"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3946 (class 2606 OID 74042)
|
||
|
-- Name: UserDescriptionTemplate UserDescriptionTemplate_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserDescriptionTemplate"
|
||
|
ADD CONSTRAINT "UserDescriptionTemplate_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3947 (class 2606 OID 74047)
|
||
|
-- Name: UserDescriptionTemplate UserDescriptionTemplate_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserDescriptionTemplate"
|
||
|
ADD CONSTRAINT "UserDescriptionTemplate_user_fkey" FOREIGN KEY ("user") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3948 (class 2606 OID 74052)
|
||
|
-- Name: UserRole UserRole_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserRole"
|
||
|
ADD CONSTRAINT "UserRole_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3949 (class 2606 OID 74057)
|
||
|
-- Name: UserRole UserRole_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserRole"
|
||
|
ADD CONSTRAINT "UserRole_user_fkey" FOREIGN KEY ("user") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3950 (class 2606 OID 74062)
|
||
|
-- Name: UserSettings UserSettings_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserSettings"
|
||
|
ADD CONSTRAINT "UserSettings_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."Tenant"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3951 (class 2606 OID 74067)
|
||
|
-- Name: UserToken UserToken_UserId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserToken"
|
||
|
ADD CONSTRAINT "UserToken_UserId_fkey" FOREIGN KEY ("UserId") REFERENCES public."User"(id) NOT VALID;
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3952 (class 2606 OID 74072)
|
||
|
-- Name: ant_Annotation ant_Annotation_parent_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_Annotation"
|
||
|
ADD CONSTRAINT "ant_Annotation_parent_fkey" FOREIGN KEY (parent_id) REFERENCES public."ant_Annotation"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3953 (class 2606 OID 74077)
|
||
|
-- Name: ant_Annotation ant_Annotation_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_Annotation"
|
||
|
ADD CONSTRAINT "ant_Annotation_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ant_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3954 (class 2606 OID 74082)
|
||
|
-- Name: ant_Annotation ant_Annotation_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_Annotation"
|
||
|
ADD CONSTRAINT "ant_Annotation_user_fkey" FOREIGN KEY (subject_id) REFERENCES public."ant_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3955 (class 2606 OID 74087)
|
||
|
-- Name: ant_EntityUser ant_EntityUser_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_EntityUser"
|
||
|
ADD CONSTRAINT "ant_EntityUser_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ant_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3956 (class 2606 OID 74092)
|
||
|
-- Name: ant_EntityUser ant_EntityUser_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_EntityUser"
|
||
|
ADD CONSTRAINT "ant_EntityUser_user_fkey" FOREIGN KEY (user_id) REFERENCES public."ant_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3957 (class 2606 OID 74097)
|
||
|
-- Name: ant_QueueInbox ant_QueryInbox_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_QueueInbox"
|
||
|
ADD CONSTRAINT "ant_QueryInbox_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ant_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3958 (class 2606 OID 74102)
|
||
|
-- Name: ant_QueueOutbox ant_QueueOutbox_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_QueueOutbox"
|
||
|
ADD CONSTRAINT "ant_QueueOutbox_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ant_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3959 (class 2606 OID 74107)
|
||
|
-- Name: ant_TenantUser ant_TenantUser_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_TenantUser"
|
||
|
ADD CONSTRAINT "ant_TenantUser_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ant_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3960 (class 2606 OID 74112)
|
||
|
-- Name: ant_TenantUser ant_TenantUser_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_TenantUser"
|
||
|
ADD CONSTRAINT "ant_TenantUser_user_fkey" FOREIGN KEY ("user") REFERENCES public."ant_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3961 (class 2606 OID 74117)
|
||
|
-- Name: ant_UserContactInfo ant_UserContactInfo_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_UserContactInfo"
|
||
|
ADD CONSTRAINT "ant_UserContactInfo_user_fkey" FOREIGN KEY ("user") REFERENCES public."ant_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3962 (class 2606 OID 74122)
|
||
|
-- Name: ant_UserCredential ant_UserCredential_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ant_UserCredential"
|
||
|
ADD CONSTRAINT "ant_UserCredential_user_fkey" FOREIGN KEY ("user") REFERENCES public."ant_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3915 (class 2606 OID 74127)
|
||
|
-- Name: Grant fk_grant_content; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Grant"
|
||
|
ADD CONSTRAINT fk_grant_content FOREIGN KEY ("Content") REFERENCES public."Content"("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3917 (class 2606 OID 74132)
|
||
|
-- Name: Invitation fk_invitation_dmp; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Invitation"
|
||
|
ADD CONSTRAINT fk_invitation_dmp FOREIGN KEY ("Dmp") REFERENCES public."DMP"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3924 (class 2606 OID 74137)
|
||
|
-- Name: Project fk_project_content; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."Project"
|
||
|
ADD CONSTRAINT fk_project_content FOREIGN KEY ("Content") REFERENCES public."Content"("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3939 (class 2606 OID 74142)
|
||
|
-- Name: UserAssociation fk_userinfo_user_association_1; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserAssociation"
|
||
|
ADD CONSTRAINT fk_userinfo_user_association_1 FOREIGN KEY ("firstUser") REFERENCES public."UserInfo"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3940 (class 2606 OID 74147)
|
||
|
-- Name: UserAssociation fk_userinfo_user_association_2; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."UserAssociation"
|
||
|
ADD CONSTRAINT fk_userinfo_user_association_2 FOREIGN KEY ("secondUser") REFERENCES public."UserInfo"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3880 (class 2606 OID 74152)
|
||
|
-- Name: DatasetExternalDataset fkey_datasetexternaldataset_dataset; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetExternalDataset"
|
||
|
ADD CONSTRAINT fkey_datasetexternaldataset_dataset FOREIGN KEY ("Dataset") REFERENCES public."Dataset"("ID");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3881 (class 2606 OID 74157)
|
||
|
-- Name: DatasetExternalDataset fkey_datasetexternaldataset_externaldataset; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."DatasetExternalDataset"
|
||
|
ADD CONSTRAINT fkey_datasetexternaldataset_externaldataset FOREIGN KEY ("ExternalDataset") REFERENCES public."ExternalDataset"("Id");
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3963 (class 2606 OID 74162)
|
||
|
-- Name: ntf_InAppNotification ntf_InAppNotification_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_InAppNotification"
|
||
|
ADD CONSTRAINT "ntf_InAppNotification_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3964 (class 2606 OID 74167)
|
||
|
-- Name: ntf_InAppNotification ntf_InAppNotification_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_InAppNotification"
|
||
|
ADD CONSTRAINT "ntf_InAppNotification_user_fkey" FOREIGN KEY ("user") REFERENCES public."ntf_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3965 (class 2606 OID 74172)
|
||
|
-- Name: ntf_Notification ntf_Notification_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_Notification"
|
||
|
ADD CONSTRAINT "ntf_Notification_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3966 (class 2606 OID 74177)
|
||
|
-- Name: ntf_Notification ntf_Notification_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_Notification"
|
||
|
ADD CONSTRAINT "ntf_Notification_user_fkey" FOREIGN KEY ("user") REFERENCES public."ntf_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3968 (class 2606 OID 74182)
|
||
|
-- Name: ntf_QueueInbox ntf_QueryInbox_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_QueueInbox"
|
||
|
ADD CONSTRAINT "ntf_QueryInbox_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3969 (class 2606 OID 74187)
|
||
|
-- Name: ntf_QueueOutbox ntf_QueueOutbox_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_QueueOutbox"
|
||
|
ADD CONSTRAINT "ntf_QueueOutbox_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3970 (class 2606 OID 74192)
|
||
|
-- Name: ntf_TenantConfiguration ntf_TenantConfiguration_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_TenantConfiguration"
|
||
|
ADD CONSTRAINT "ntf_TenantConfiguration_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3971 (class 2606 OID 74197)
|
||
|
-- Name: ntf_TenantUser ntf_TenantUser_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_TenantUser"
|
||
|
ADD CONSTRAINT "ntf_TenantUser_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3972 (class 2606 OID 74202)
|
||
|
-- Name: ntf_TenantUser ntf_TenantUser_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_TenantUser"
|
||
|
ADD CONSTRAINT "ntf_TenantUser_user_fkey" FOREIGN KEY ("user") REFERENCES public."ntf_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3973 (class 2606 OID 74207)
|
||
|
-- Name: ntf_UserContactInfo ntf_UserContactInfo_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserContactInfo"
|
||
|
ADD CONSTRAINT "ntf_UserContactInfo_user_fkey" FOREIGN KEY ("user") REFERENCES public."ntf_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3974 (class 2606 OID 74212)
|
||
|
-- Name: ntf_UserCredential ntf_UserCredential_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserCredential"
|
||
|
ADD CONSTRAINT "ntf_UserCredential_user_fkey" FOREIGN KEY ("user") REFERENCES public."ntf_User"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3975 (class 2606 OID 74217)
|
||
|
-- Name: ntf_UserNotificationPreference ntf_UserNotificationPreference_tenant_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserNotificationPreference"
|
||
|
ADD CONSTRAINT "ntf_UserNotificationPreference_tenant_fkey" FOREIGN KEY (tenant) REFERENCES public."ntf_Tenant"(id);
|
||
|
|
||
|
|
||
|
--
|
||
|
-- TOC entry 3976 (class 2606 OID 74222)
|
||
|
-- Name: ntf_UserNotificationPreference ntf_UserNotificationPreference_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||
|
--
|
||
|
|
||
|
ALTER TABLE ONLY public."ntf_UserNotificationPreference"
|
||
|
ADD CONSTRAINT "ntf_UserNotificationPreference_user_fkey" FOREIGN KEY ("user") REFERENCES public."ntf_User"(id);
|
||
|
|
||
|
|
||
|
-- Completed on 2024-05-09 15:11:14
|
||
|
|
||
|
--
|
||
|
-- PostgreSQL database dump complete
|
||
|
--
|
||
|
|