From 7e05bb8a8e4ff18d779625679397e19acf89d6dc Mon Sep 17 00:00:00 2001
From: Lars Johansson <lars.johansson@ess.eu>
Date: Wed, 3 Jan 2024 10:18:57 +0100
Subject: [PATCH] Add test data

---
 src/test/resources/db/data/README.txt         |   14 +-
 .../db/data/dump-discs_names_subsystemit.sql  | 1854 +++++++++++++++++
 2 files changed, 1865 insertions(+), 3 deletions(-)
 create mode 100644 src/test/resources/db/data/dump-discs_names_subsystemit.sql

diff --git a/src/test/resources/db/data/README.txt b/src/test/resources/db/data/README.txt
index cb4c3048..5f132e02 100644
--- a/src/test/resources/db/data/README.txt
+++ b/src/test/resources/db/data/README.txt
@@ -4,13 +4,21 @@ README
 Folder contains backup of data for Naming database that may be useful for development and maintenance.
 
 Content prepared by
-- using NamesIT test class
-- setting debug point in readSearchHistoryDeleted method
+- integration test class - method
+      NamesIT                  readSearchHistoryDeleted
+      StructuresSubsystemIT    readSearchStatusDeletedChildren
+- setting debug point in methods at first statement in try clause
 - debug
 - when test is halted, use database management tool to backup data
 
 Backup done with DBeaver tool
-    DBeaver 21.2.0
+    21.2.0    dump-discs_names_namesit.sql
+    23.3.1    dump-discs_names_subsystemit.sql
+
+Restore to be done with psql
+    make sure database container is up and running
+    e.g.
+        psql --host=localhost --port=5432 --dbname=discs_names --username=discs_names < ......../naming-backend/src/test/resources/db/data/dump-discs_names_subsystemit.sql
 
 DBeaver
   https://dbeaver.io/
diff --git a/src/test/resources/db/data/dump-discs_names_subsystemit.sql b/src/test/resources/db/data/dump-discs_names_subsystemit.sql
new file mode 100644
index 00000000..b8c8576e
--- /dev/null
+++ b/src/test/resources/db/data/dump-discs_names_subsystemit.sql
@@ -0,0 +1,1854 @@
+--
+-- PostgreSQL database dump
+--
+
+-- Dumped from database version 9.6.7
+-- Dumped by pg_dump version 9.6.24
+
+-- Started on 2024-01-02 15:16:38 CET
+
+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 228 (class 1255 OID 16623)
+-- Name: get_instance_index(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_instance_index(convention_name text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    len int;
+    pos int;
+    mnemonic_path text;
+    nbr_delimiters int;
+BEGIN
+    pos = strpos(convention_name, ':');
+    IF pos > 0  THEN
+        mnemonic_path = substr(convention_name, pos+1);
+        nbr_delimiters = array_length(string_to_array(mnemonic_path, '-'), 1) - 1;
+        IF nbr_delimiters = 2 then
+            mnemonic_path = reverse(mnemonic_path);
+            len = length(mnemonic_path);
+            pos = strpos(mnemonic_path, '-');
+            mnemonic_path = reverse(mnemonic_path);
+            RETURN substr(mnemonic_path, len - pos + 2);
+        ELSE
+            RETURN null;
+        END IF;
+    END IF;
+    RETURN null;
+END;
+$$;
+
+
+--
+-- TOC entry 214 (class 1255 OID 16622)
+-- Name: get_mnemonic_path_device_structure(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_mnemonic_path_device_structure(convention_name text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    pos int;
+    mnemonic_path text;
+    nbr_delimiters int;
+BEGIN
+    pos = strpos(convention_name, ':');
+    IF pos > 0  THEN
+        mnemonic_path = substr(convention_name, pos+1);
+        nbr_delimiters = array_length(string_to_array(mnemonic_path, '-'), 1) - 1;
+        IF nbr_delimiters = 2 then
+            mnemonic_path = reverse(mnemonic_path);
+            mnemonic_path = substr(mnemonic_path, strpos(mnemonic_path, '-')+1);
+            RETURN reverse(mnemonic_path);
+        ELSIF nbr_delimiters = 1 then
+            return mnemonic_path;
+        ELSE
+            RETURN null;
+        END IF;
+    END IF;
+    RETURN null;
+END;
+$$;
+
+
+--
+-- TOC entry 215 (class 1255 OID 16626)
+-- Name: get_mnemonic_path_devicegroup(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_mnemonic_path_devicegroup(devicegroup_uuid text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    discipline_uuid text;
+    discipline_mnemonic text;
+BEGIN
+    select parent_uuid into discipline_uuid from devicegroup where uuid = devicegroup_uuid and latest = true;
+    select mnemonic into discipline_mnemonic from discipline where uuid = discipline_uuid and latest = true;
+
+    if discipline_mnemonic is not null then
+        return discipline_mnemonic;
+    else
+        return null;
+    end if;
+END;
+$$;
+
+
+--
+-- TOC entry 231 (class 1255 OID 16627)
+-- Name: get_mnemonic_path_devicetype(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_mnemonic_path_devicetype(devicetype_uuid text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    devicetype_mnemonic text;
+    devicegroup_uuid text;
+    discipline_uuid text;
+    discipline_mnemonic text;
+BEGIN
+    select parent_uuid, mnemonic into devicegroup_uuid, devicetype_mnemonic from devicetype where uuid = devicetype_uuid and latest = true;
+    select parent_uuid, mnemonic into discipline_uuid from devicegroup where uuid = devicegroup_uuid and latest = true;
+    select mnemonic into discipline_mnemonic from discipline where uuid = discipline_uuid and latest = true;
+
+    if discipline_mnemonic is not null and devicetype_mnemonic is not null then
+        return concat(discipline_mnemonic, '-', devicetype_mnemonic);
+    elsif devicetype_mnemonic is not null then
+        return devicetype_mnemonic;
+    else
+        return null;
+    end if;
+END;
+$$;
+
+
+--
+-- TOC entry 230 (class 1255 OID 16625)
+-- Name: get_mnemonic_path_subsystem(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_mnemonic_path_subsystem(subsystem_uuid text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    subsystem_mnemonic text;
+    system_uuid text;
+    system_mnemonic text;
+BEGIN
+    select parent_uuid, mnemonic into system_uuid, subsystem_mnemonic from subsystem where uuid = subsystem_uuid and latest = true;
+    select mnemonic into system_mnemonic from "system" where uuid = system_uuid and latest = true;
+
+    if system_mnemonic is not null and subsystem_mnemonic is not null then
+        return concat(system_mnemonic, '-', subsystem_mnemonic);
+    else
+        return null;
+    end if;
+END;
+$$;
+
+
+--
+-- TOC entry 229 (class 1255 OID 16624)
+-- Name: get_mnemonic_path_system(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_mnemonic_path_system(system_uuid text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    system_mnemonic text;
+BEGIN
+    select mnemonic into system_mnemonic from "system" where uuid = system_uuid and latest = true;
+
+    if system_mnemonic is not null then
+        return system_mnemonic;
+    else
+        return null;
+    end if;
+END;
+$$;
+
+
+--
+-- TOC entry 213 (class 1255 OID 16621)
+-- Name: get_mnemonic_path_system_structure(text); Type: FUNCTION; Schema: public; Owner: -
+--
+
+CREATE FUNCTION public.get_mnemonic_path_system_structure(convention_name text) RETURNS text
+    LANGUAGE plpgsql
+    AS $$
+DECLARE
+    pos int;
+BEGIN
+    pos = strpos(convention_name, ':');
+    IF pos > 0  THEN
+        RETURN substr(convention_name, 1, pos-1);
+    END IF;
+    RETURN convention_name;
+END;
+$$;
+
+
+SET default_tablespace = '';
+
+SET default_with_oids = false;
+
+--
+-- TOC entry 185 (class 1259 OID 16386)
+-- Name: appinfo; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.appinfo (
+    id bigint NOT NULL,
+    version integer,
+    schemaversion integer NOT NULL
+);
+
+
+--
+-- TOC entry 186 (class 1259 OID 16389)
+-- Name: appinfo_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.appinfo_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2352 (class 0 OID 0)
+-- Dependencies: 186
+-- Name: appinfo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.appinfo_id_seq OWNED BY public.appinfo.id;
+
+
+--
+-- TOC entry 187 (class 1259 OID 16391)
+-- Name: device; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.device (
+    id bigint NOT NULL,
+    version integer,
+    uuid character varying(255)
+);
+
+
+--
+-- TOC entry 188 (class 1259 OID 16394)
+-- Name: device_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.device_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2353 (class 0 OID 0)
+-- Dependencies: 188
+-- Name: device_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.device_id_seq OWNED BY public.device.id;
+
+
+--
+-- TOC entry 203 (class 1259 OID 16518)
+-- Name: devicegroup; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.devicegroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    parent_uuid text,
+    name text,
+    mnemonic text,
+    mnemonic_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 210 (class 1259 OID 16594)
+-- Name: devicegroup_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.devicegroup_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2354 (class 0 OID 0)
+-- Dependencies: 210
+-- Name: devicegroup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.devicegroup_id_seq OWNED BY public.devicegroup.id;
+
+
+--
+-- TOC entry 189 (class 1259 OID 16396)
+-- Name: devicerevision; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.devicerevision (
+    id bigint NOT NULL,
+    version integer,
+    additionalinfo character varying(255),
+    conventionname character varying(255),
+    conventionnameeqclass character varying(255),
+    deleted boolean NOT NULL,
+    instanceindex character varying(255),
+    requestdate timestamp without time zone,
+    device_id bigint,
+    devicetype_id bigint,
+    requestedby_id bigint,
+    section_id bigint,
+    processorcomment character varying(255)
+);
+
+
+--
+-- TOC entry 190 (class 1259 OID 16402)
+-- Name: devicerevision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.devicerevision_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2355 (class 0 OID 0)
+-- Dependencies: 190
+-- Name: devicerevision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.devicerevision_id_seq OWNED BY public.devicerevision.id;
+
+
+--
+-- TOC entry 204 (class 1259 OID 16524)
+-- Name: devicetype; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.devicetype (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    parent_uuid text,
+    name text,
+    mnemonic text,
+    mnemonic_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 211 (class 1259 OID 16596)
+-- Name: devicetype_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.devicetype_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2356 (class 0 OID 0)
+-- Dependencies: 211
+-- Name: devicetype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.devicetype_id_seq OWNED BY public.devicetype.id;
+
+
+--
+-- TOC entry 202 (class 1259 OID 16512)
+-- Name: discipline; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.discipline (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    name text,
+    mnemonic text,
+    mnemonic_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 209 (class 1259 OID 16592)
+-- Name: discipline_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.discipline_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2357 (class 0 OID 0)
+-- Dependencies: 209
+-- Name: discipline_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.discipline_id_seq OWNED BY public.discipline.id;
+
+
+--
+-- TOC entry 205 (class 1259 OID 16530)
+-- Name: name; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.name (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    systemgroup_uuid text,
+    system_uuid text,
+    subsystem_uuid text,
+    devicetype_uuid text,
+    instance_index text,
+    convention_name text,
+    convention_name_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 212 (class 1259 OID 16598)
+-- Name: name_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.name_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2358 (class 0 OID 0)
+-- Dependencies: 212
+-- Name: name_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.name_id_seq OWNED BY public.name.id;
+
+
+--
+-- TOC entry 191 (class 1259 OID 16404)
+-- Name: namepart; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.namepart (
+    id bigint NOT NULL,
+    version integer,
+    nameparttype character varying(255),
+    uuid character varying(255)
+);
+
+
+--
+-- TOC entry 192 (class 1259 OID 16410)
+-- Name: namepart_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.namepart_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2359 (class 0 OID 0)
+-- Dependencies: 192
+-- Name: namepart_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.namepart_id_seq OWNED BY public.namepart.id;
+
+
+--
+-- TOC entry 193 (class 1259 OID 16412)
+-- Name: namepartrevision; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.namepartrevision (
+    id bigint NOT NULL,
+    version integer,
+    deleted boolean NOT NULL,
+    description character varying(255),
+    mnemonic character varying(255),
+    mnemoniceqclass character varying(255),
+    name character varying(255),
+    processdate timestamp without time zone,
+    processorcomment character varying(255),
+    requestdate timestamp without time zone,
+    requestercomment character varying(255),
+    status character varying(255),
+    namepart_id bigint,
+    parent_id bigint,
+    processedby_id bigint,
+    requestedby_id bigint
+);
+
+
+--
+-- TOC entry 194 (class 1259 OID 16418)
+-- Name: namepartrevision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.namepartrevision_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2360 (class 0 OID 0)
+-- Dependencies: 194
+-- Name: namepartrevision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.namepartrevision_id_seq OWNED BY public.namepartrevision.id;
+
+
+--
+-- TOC entry 201 (class 1259 OID 16506)
+-- Name: subsystem; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.subsystem (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    parent_uuid text,
+    name text,
+    mnemonic text,
+    mnemonic_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 208 (class 1259 OID 16590)
+-- Name: subsystem_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.subsystem_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2361 (class 0 OID 0)
+-- Dependencies: 208
+-- Name: subsystem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.subsystem_id_seq OWNED BY public.subsystem.id;
+
+
+--
+-- TOC entry 200 (class 1259 OID 16500)
+-- Name: system; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.system (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    parent_uuid text,
+    name text,
+    mnemonic text,
+    mnemonic_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 207 (class 1259 OID 16588)
+-- Name: system_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.system_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2362 (class 0 OID 0)
+-- Dependencies: 207
+-- Name: system_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.system_id_seq OWNED BY public.system.id;
+
+
+--
+-- TOC entry 199 (class 1259 OID 16494)
+-- Name: systemgroup; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.systemgroup (
+    id bigint NOT NULL,
+    version integer,
+    uuid text,
+    name text,
+    mnemonic text,
+    mnemonic_equivalence text,
+    description text,
+    status text,
+    latest boolean NOT NULL,
+    deleted boolean NOT NULL,
+    requested timestamp without time zone,
+    requested_by text,
+    requested_comment text,
+    processed timestamp without time zone,
+    processed_by text,
+    processed_comment text
+);
+
+
+--
+-- TOC entry 206 (class 1259 OID 16586)
+-- Name: systemgroup_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.systemgroup_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2363 (class 0 OID 0)
+-- Dependencies: 206
+-- Name: systemgroup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.systemgroup_id_seq OWNED BY public.systemgroup.id;
+
+
+--
+-- TOC entry 198 (class 1259 OID 16488)
+-- Name: user_notification; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.user_notification (
+    id bigint NOT NULL,
+    notification_type character varying(32) NOT NULL,
+    user_login_name character varying(32) NOT NULL
+);
+
+
+--
+-- TOC entry 197 (class 1259 OID 16486)
+-- Name: user_notification_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.user_notification_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2364 (class 0 OID 0)
+-- Dependencies: 197
+-- Name: user_notification_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.user_notification_id_seq OWNED BY public.user_notification.id;
+
+
+--
+-- TOC entry 195 (class 1259 OID 16420)
+-- Name: useraccount; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.useraccount (
+    id bigint NOT NULL,
+    version integer,
+    role character varying(255),
+    username character varying(255)
+);
+
+
+--
+-- TOC entry 196 (class 1259 OID 16426)
+-- Name: useraccount_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.useraccount_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- TOC entry 2365 (class 0 OID 0)
+-- Dependencies: 196
+-- Name: useraccount_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.useraccount_id_seq OWNED BY public.useraccount.id;
+
+
+--
+-- TOC entry 2101 (class 2604 OID 16428)
+-- Name: appinfo id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.appinfo ALTER COLUMN id SET DEFAULT nextval('public.appinfo_id_seq'::regclass);
+
+
+--
+-- TOC entry 2102 (class 2604 OID 16429)
+-- Name: device id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.device ALTER COLUMN id SET DEFAULT nextval('public.device_id_seq'::regclass);
+
+
+--
+-- TOC entry 2112 (class 2604 OID 16604)
+-- Name: devicegroup id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicegroup ALTER COLUMN id SET DEFAULT nextval('public.devicegroup_id_seq'::regclass);
+
+
+--
+-- TOC entry 2103 (class 2604 OID 16430)
+-- Name: devicerevision id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicerevision ALTER COLUMN id SET DEFAULT nextval('public.devicerevision_id_seq'::regclass);
+
+
+--
+-- TOC entry 2113 (class 2604 OID 16605)
+-- Name: devicetype id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicetype ALTER COLUMN id SET DEFAULT nextval('public.devicetype_id_seq'::regclass);
+
+
+--
+-- TOC entry 2111 (class 2604 OID 16603)
+-- Name: discipline id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.discipline ALTER COLUMN id SET DEFAULT nextval('public.discipline_id_seq'::regclass);
+
+
+--
+-- TOC entry 2114 (class 2604 OID 16606)
+-- Name: name id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.name ALTER COLUMN id SET DEFAULT nextval('public.name_id_seq'::regclass);
+
+
+--
+-- TOC entry 2104 (class 2604 OID 16431)
+-- Name: namepart id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepart ALTER COLUMN id SET DEFAULT nextval('public.namepart_id_seq'::regclass);
+
+
+--
+-- TOC entry 2105 (class 2604 OID 16432)
+-- Name: namepartrevision id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepartrevision ALTER COLUMN id SET DEFAULT nextval('public.namepartrevision_id_seq'::regclass);
+
+
+--
+-- TOC entry 2110 (class 2604 OID 16602)
+-- Name: subsystem id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.subsystem ALTER COLUMN id SET DEFAULT nextval('public.subsystem_id_seq'::regclass);
+
+
+--
+-- TOC entry 2109 (class 2604 OID 16601)
+-- Name: system id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.system ALTER COLUMN id SET DEFAULT nextval('public.system_id_seq'::regclass);
+
+
+--
+-- TOC entry 2108 (class 2604 OID 16600)
+-- Name: systemgroup id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.systemgroup ALTER COLUMN id SET DEFAULT nextval('public.systemgroup_id_seq'::regclass);
+
+
+--
+-- TOC entry 2107 (class 2604 OID 16491)
+-- Name: user_notification id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.user_notification ALTER COLUMN id SET DEFAULT nextval('public.user_notification_id_seq'::regclass);
+
+
+--
+-- TOC entry 2106 (class 2604 OID 16433)
+-- Name: useraccount id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.useraccount ALTER COLUMN id SET DEFAULT nextval('public.useraccount_id_seq'::regclass);
+
+
+--
+-- TOC entry 2318 (class 0 OID 16386)
+-- Dependencies: 185
+-- Data for Name: appinfo; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.appinfo (id, version, schemaversion) FROM stdin;
+1	1	1
+\.
+
+
+--
+-- TOC entry 2366 (class 0 OID 0)
+-- Dependencies: 186
+-- Name: appinfo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.appinfo_id_seq', 1, true);
+
+
+--
+-- TOC entry 2320 (class 0 OID 16391)
+-- Dependencies: 187
+-- Data for Name: device; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.device (id, version, uuid) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2367 (class 0 OID 0)
+-- Dependencies: 188
+-- Name: device_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.device_id_seq', 1, false);
+
+
+--
+-- TOC entry 2336 (class 0 OID 16518)
+-- Dependencies: 203
+-- Data for Name: devicegroup; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.devicegroup (id, version, uuid, parent_uuid, name, mnemonic, mnemonic_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2368 (class 0 OID 0)
+-- Dependencies: 210
+-- Name: devicegroup_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.devicegroup_id_seq', 1, false);
+
+
+--
+-- TOC entry 2322 (class 0 OID 16396)
+-- Dependencies: 189
+-- Data for Name: devicerevision; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.devicerevision (id, version, additionalinfo, conventionname, conventionnameeqclass, deleted, instanceindex, requestdate, device_id, devicetype_id, requestedby_id, section_id, processorcomment) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2369 (class 0 OID 0)
+-- Dependencies: 190
+-- Name: devicerevision_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.devicerevision_id_seq', 1, false);
+
+
+--
+-- TOC entry 2337 (class 0 OID 16524)
+-- Dependencies: 204
+-- Data for Name: devicetype; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.devicetype (id, version, uuid, parent_uuid, name, mnemonic, mnemonic_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2370 (class 0 OID 0)
+-- Dependencies: 211
+-- Name: devicetype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.devicetype_id_seq', 1, false);
+
+
+--
+-- TOC entry 2335 (class 0 OID 16512)
+-- Dependencies: 202
+-- Data for Name: discipline; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.discipline (id, version, uuid, name, mnemonic, mnemonic_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2371 (class 0 OID 0)
+-- Dependencies: 209
+-- Name: discipline_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.discipline_id_seq', 1, false);
+
+
+--
+-- TOC entry 2338 (class 0 OID 16530)
+-- Dependencies: 205
+-- Data for Name: name; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.name (id, version, uuid, systemgroup_uuid, system_uuid, subsystem_uuid, devicetype_uuid, instance_index, convention_name, convention_name_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2372 (class 0 OID 0)
+-- Dependencies: 212
+-- Name: name_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.name_id_seq', 1, true);
+
+
+--
+-- TOC entry 2324 (class 0 OID 16404)
+-- Dependencies: 191
+-- Data for Name: namepart; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.namepart (id, version, nameparttype, uuid) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2373 (class 0 OID 0)
+-- Dependencies: 192
+-- Name: namepart_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.namepart_id_seq', 1, false);
+
+
+--
+-- TOC entry 2326 (class 0 OID 16412)
+-- Dependencies: 193
+-- Data for Name: namepartrevision; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.namepartrevision (id, version, deleted, description, mnemonic, mnemoniceqclass, name, processdate, processorcomment, requestdate, requestercomment, status, namepart_id, parent_id, processedby_id, requestedby_id) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2374 (class 0 OID 0)
+-- Dependencies: 194
+-- Name: namepartrevision_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.namepartrevision_id_seq', 1, false);
+
+
+--
+-- TOC entry 2334 (class 0 OID 16506)
+-- Dependencies: 201
+-- Data for Name: subsystem; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.subsystem (id, version, uuid, parent_uuid, name, mnemonic, mnemonic_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+1	1	bf198d61-e4c8-4bfb-a782-e5febdca3434	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AA1	AA1	description	APPROVED	t	f	2024-01-02 14:10:10.623	test who	comment	2024-01-02 14:10:10.67	test who	comment
+2	1	93034f9f-4d46-4b97-b9f3-0dc3bebd1a44	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AA2	AA2	description	APPROVED	t	f	2024-01-02 14:10:10.71	test who	comment	2024-01-02 14:10:10.74	test who	comment
+3	1	191815db-f25f-4bdd-a296-81a69d82d6dc	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AA3	AA3	description	APPROVED	t	f	2024-01-02 14:10:10.777	test who	comment	2024-01-02 14:10:10.807	test who	comment
+4	1	b42fadc1-f6e1-4fbb-a687-e8df018db482	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AA4	AA4	description	APPROVED	t	f	2024-01-02 14:10:10.852	test who	comment	2024-01-02 14:10:10.88	test who	comment
+5	1	0721390f-05b3-4093-a954-7012084b2c24	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AA5	AA5	description	APPROVED	t	f	2024-01-02 14:10:10.912	test who	comment	2024-01-02 14:10:10.939	test who	comment
+6	1	80174ab5-f1e7-4c75-beb4-5542f153e98c	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AB1	AB1	description	CANCELLED	f	f	2024-01-02 14:10:10.977	test who	comment	2024-01-02 14:10:11.003	test who	comment
+7	1	6a354c12-82fe-4725-996e-3e8d7af24a97	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AB2	AB2	description	CANCELLED	f	f	2024-01-02 14:10:11.036	test who	comment	2024-01-02 14:10:11.071	test who	comment
+8	1	0582fadc-11c4-4fe2-b091-afc435c36343	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AB3	AB3	description	CANCELLED	f	f	2024-01-02 14:10:11.093	test who	comment	2024-01-02 14:10:11.116	test who	comment
+9	1	cba8ca99-0913-40f0-8d6c-9d0276ae652c	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AB4	AB4	description	CANCELLED	f	f	2024-01-02 14:10:11.139	test who	comment	2024-01-02 14:10:11.159	test who	comment
+10	1	e4cba52f-7f63-4347-b302-0fee6526ab71	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AB5	AB5	description	CANCELLED	f	f	2024-01-02 14:10:11.18	test who	comment	2024-01-02 14:10:11.2	test who	comment
+11	1	0b2929ab-a3b3-491b-b541-761d0f8a4527	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AC1	AC1	description	REJECTED	f	f	2024-01-02 14:10:11.224	test who	comment	2024-01-02 14:10:11.245	test who	comment
+12	1	4e52fa1d-2660-4855-9d3b-00e0cdf9ecdd	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AC2	AC2	description	REJECTED	f	f	2024-01-02 14:10:11.266	test who	comment	2024-01-02 14:10:11.285	test who	comment
+13	1	7db2efed-54b8-4b40-9bae-c44464661a80	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AC3	AC3	description	REJECTED	f	f	2024-01-02 14:10:11.31	test who	comment	2024-01-02 14:10:11.332	test who	comment
+14	1	dc3548fb-66f3-4258-b17b-ee5ab88445fe	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AC4	AC4	description	REJECTED	f	f	2024-01-02 14:10:11.353	test who	comment	2024-01-02 14:10:11.372	test who	comment
+15	1	231d8e96-3afd-497c-bef4-86437cf07cb9	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AC5	AC5	description	REJECTED	f	f	2024-01-02 14:10:11.394	test who	comment	2024-01-02 14:10:11.415	test who	comment
+16	0	c00924f0-6f2a-4296-b694-ec4eb845ae4c	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AD1	AD1	description	PENDING	f	f	2024-01-02 14:10:11.435	test who	comment	\N	\N	\N
+17	0	1ad22b9d-2d58-417f-b7c8-8a04e8ca9857	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AD2	AD2	description	PENDING	f	f	2024-01-02 14:10:11.459	test who	comment	\N	\N	\N
+18	0	cd976976-123a-47fb-8e05-06ecf348ad75	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AD3	AD3	description	PENDING	f	f	2024-01-02 14:10:11.491	test who	comment	\N	\N	\N
+19	0	3ed7a658-86f3-4684-9280-fea2c760596e	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AD4	AD4	description	PENDING	f	f	2024-01-02 14:10:11.517	test who	comment	\N	\N	\N
+20	0	9675d178-c7a8-4a03-906b-516b86cffa72	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AD5	AD5	description	PENDING	f	f	2024-01-02 14:10:11.537	test who	comment	\N	\N	\N
+21	2	49d97dc0-bfe6-4dd7-b1ec-511870ef8a9f	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE1	AE1	description	APPROVED	f	f	2024-01-02 14:10:11.557	test who	comment	2024-01-02 14:10:11.581	test who	comment
+22	2	49d97dc0-bfe6-4dd7-b1ec-511870ef8a9f	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE1	AE1	some other description	APPROVED	f	f	2024-01-02 14:10:11.624	test who	some other comment	2024-01-02 14:10:11.65	test who	some other comment
+23	1	49d97dc0-bfe6-4dd7-b1ec-511870ef8a9f	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE1	AE1	more description	APPROVED	t	f	2024-01-02 14:10:11.689	test who	more comment	2024-01-02 14:10:11.725	test who	more comment
+24	1	49d97dc0-bfe6-4dd7-b1ec-511870ef8a9f	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE1	AE1	more description	REJECTED	f	t	2024-01-02 14:10:11.763	test who	comment	2024-01-02 14:10:11.794	test who	comment
+25	2	8c9cefc9-549e-4ab2-8385-850b77dc51aa	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE2	AE2	description	APPROVED	f	f	2024-01-02 14:10:11.827	test who	comment	2024-01-02 14:10:11.857	test who	comment
+26	2	8c9cefc9-549e-4ab2-8385-850b77dc51aa	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE2	AE2	some other description	APPROVED	f	f	2024-01-02 14:10:11.89	test who	some other comment	2024-01-02 14:10:11.924	test who	some other comment
+27	1	8c9cefc9-549e-4ab2-8385-850b77dc51aa	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE2	AE2	more description	APPROVED	t	f	2024-01-02 14:10:11.957	test who	more comment	2024-01-02 14:10:11.984	test who	more comment
+28	1	8c9cefc9-549e-4ab2-8385-850b77dc51aa	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE2	AE2	more description	REJECTED	f	t	2024-01-02 14:10:12.005	test who	comment	2024-01-02 14:10:12.036	test who	comment
+29	2	a3b65288-9b15-4111-9c07-89ac0335c442	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE3	AE3	description	APPROVED	f	f	2024-01-02 14:10:12.069	test who	comment	2024-01-02 14:10:12.099	test who	comment
+30	2	a3b65288-9b15-4111-9c07-89ac0335c442	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE3	AE3	some other description	APPROVED	f	f	2024-01-02 14:10:12.128	test who	some other comment	2024-01-02 14:10:12.153	test who	some other comment
+31	1	a3b65288-9b15-4111-9c07-89ac0335c442	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE3	AE3	more description	APPROVED	t	f	2024-01-02 14:10:12.185	test who	more comment	2024-01-02 14:10:12.204	test who	more comment
+32	1	a3b65288-9b15-4111-9c07-89ac0335c442	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE3	AE3	more description	REJECTED	f	t	2024-01-02 14:10:12.224	test who	comment	2024-01-02 14:10:12.245	test who	comment
+33	2	73002440-4a1a-4d36-97c0-260ca06d41c4	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE4	AE4	description	APPROVED	f	f	2024-01-02 14:10:12.274	test who	comment	2024-01-02 14:10:12.301	test who	comment
+34	2	73002440-4a1a-4d36-97c0-260ca06d41c4	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE4	AE4	some other description	APPROVED	f	f	2024-01-02 14:10:12.33	test who	some other comment	2024-01-02 14:10:12.349	test who	some other comment
+35	1	73002440-4a1a-4d36-97c0-260ca06d41c4	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE4	AE4	more description	APPROVED	t	f	2024-01-02 14:10:12.368	test who	more comment	2024-01-02 14:10:12.386	test who	more comment
+36	1	73002440-4a1a-4d36-97c0-260ca06d41c4	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE4	AE4	more description	REJECTED	f	t	2024-01-02 14:10:12.413	test who	comment	2024-01-02 14:10:12.43	test who	comment
+37	2	9f768e3a-7643-44f2-b0ce-9c8ed41024d1	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE5	AE5	description	APPROVED	f	f	2024-01-02 14:10:12.45	test who	comment	2024-01-02 14:10:12.47	test who	comment
+38	2	9f768e3a-7643-44f2-b0ce-9c8ed41024d1	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE5	AE5	some other description	APPROVED	f	f	2024-01-02 14:10:12.496	test who	some other comment	2024-01-02 14:10:12.528	test who	some other comment
+39	1	9f768e3a-7643-44f2-b0ce-9c8ed41024d1	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE5	AE5	more description	APPROVED	t	f	2024-01-02 14:10:12.562	test who	more comment	2024-01-02 14:10:12.593	test who	more comment
+40	1	9f768e3a-7643-44f2-b0ce-9c8ed41024d1	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AE5	AE5	more description	REJECTED	f	t	2024-01-02 14:10:12.618	test who	comment	2024-01-02 14:10:12.643	test who	comment
+41	2	94635ca4-bf61-46e0-863f-84934a61117b	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF1	AF1	description	APPROVED	f	f	2024-01-02 14:10:12.663	test who	comment	2024-01-02 14:10:12.69	test who	comment
+42	1	94635ca4-bf61-46e0-863f-84934a61117b	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF1	AF1	description	APPROVED	t	t	2024-01-02 14:10:12.718	test who	comment	2024-01-02 14:10:12.745	test who	comment
+43	2	a50a7a4b-cb5e-40a1-b286-05012276dcc0	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF2	AF2	description	APPROVED	f	f	2024-01-02 14:10:12.768	test who	comment	2024-01-02 14:10:12.791	test who	comment
+44	1	a50a7a4b-cb5e-40a1-b286-05012276dcc0	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF2	AF2	description	APPROVED	t	t	2024-01-02 14:10:12.818	test who	comment	2024-01-02 14:10:12.837	test who	comment
+45	2	8c5bdae5-2b9b-4490-9e15-566739f36e1b	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF3	AF3	description	APPROVED	f	f	2024-01-02 14:10:12.861	test who	comment	2024-01-02 14:10:12.888	test who	comment
+46	1	8c5bdae5-2b9b-4490-9e15-566739f36e1b	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF3	AF3	description	APPROVED	t	t	2024-01-02 14:10:12.906	test who	comment	2024-01-02 14:10:12.924	test who	comment
+47	2	e48112ff-18b6-4691-bbcd-03be6b735a17	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF4	AF4	description	APPROVED	f	f	2024-01-02 14:10:12.949	test who	comment	2024-01-02 14:10:12.965	test who	comment
+48	1	e48112ff-18b6-4691-bbcd-03be6b735a17	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF4	AF4	description	APPROVED	t	t	2024-01-02 14:10:12.991	test who	comment	2024-01-02 14:10:13.009	test who	comment
+49	2	2da50b7c-185d-4f6e-8273-9f68943a7bc5	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF5	AF5	description	APPROVED	f	f	2024-01-02 14:10:13.03	test who	comment	2024-01-02 14:10:13.046	test who	comment
+50	1	2da50b7c-185d-4f6e-8273-9f68943a7bc5	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AF5	AF5	description	APPROVED	t	t	2024-01-02 14:10:13.063	test who	comment	2024-01-02 14:10:13.08	test who	comment
+51	1	c3d18240-319e-4915-86fc-2a45bc02f537	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG1	AG1	description	APPROVED	t	f	2024-01-02 14:10:13.1	test who	comment	2024-01-02 14:10:13.121	test who	comment
+52	0	c3d18240-319e-4915-86fc-2a45bc02f537	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG1	AG1	description	PENDING	f	t	2024-01-02 14:10:13.142	test who	comment	\N	\N	\N
+53	1	870b93f4-df90-4c03-8373-7ac5767256b8	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG2	AG2	description	APPROVED	t	f	2024-01-02 14:10:13.168	test who	comment	2024-01-02 14:10:13.191	test who	comment
+54	0	870b93f4-df90-4c03-8373-7ac5767256b8	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG2	AG2	description	PENDING	f	t	2024-01-02 14:10:13.208	test who	comment	\N	\N	\N
+55	1	ddc87e8d-6641-4159-ba2a-15180cb6c076	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG3	AG3	description	APPROVED	t	f	2024-01-02 14:10:13.225	test who	comment	2024-01-02 14:10:13.246	test who	comment
+56	0	ddc87e8d-6641-4159-ba2a-15180cb6c076	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG3	AG3	description	PENDING	f	t	2024-01-02 14:10:13.276	test who	comment	\N	\N	\N
+57	1	43906547-007d-4ac2-baa7-20b99b299ee3	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG4	AG4	description	APPROVED	t	f	2024-01-02 14:10:13.301	test who	comment	2024-01-02 14:10:13.321	test who	comment
+58	0	43906547-007d-4ac2-baa7-20b99b299ee3	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG4	AG4	description	PENDING	f	t	2024-01-02 14:10:13.343	test who	comment	\N	\N	\N
+59	1	43502b1d-5002-434e-b265-f7487cc8cc8b	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG5	AG5	description	APPROVED	t	f	2024-01-02 14:10:13.363	test who	comment	2024-01-02 14:10:13.379	test who	comment
+60	0	43502b1d-5002-434e-b265-f7487cc8cc8b	dbf3b52d-d212-4ace-9b3a-099e8902beaf	name	AG5	AG5	description	PENDING	f	t	2024-01-02 14:10:13.396	test who	comment	\N	\N	\N
+\.
+
+
+--
+-- TOC entry 2375 (class 0 OID 0)
+-- Dependencies: 208
+-- Name: subsystem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.subsystem_id_seq', 60, true);
+
+
+--
+-- TOC entry 2333 (class 0 OID 16500)
+-- Dependencies: 200
+-- Data for Name: system; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.system (id, version, uuid, parent_uuid, name, mnemonic, mnemonic_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+1	1	dbf3b52d-d212-4ace-9b3a-099e8902beaf	944db2b0-a880-4289-b1c2-b7aa98cab1b2	name	Sys	SYS	description	APPROVED	t	f	2024-01-02 14:10:10.492	test who	comment	2024-01-02 14:10:10.563	test who	comment
+\.
+
+
+--
+-- TOC entry 2376 (class 0 OID 0)
+-- Dependencies: 207
+-- Name: system_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.system_id_seq', 1, true);
+
+
+--
+-- TOC entry 2332 (class 0 OID 16494)
+-- Dependencies: 199
+-- Data for Name: systemgroup; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.systemgroup (id, version, uuid, name, mnemonic, mnemonic_equivalence, description, status, latest, deleted, requested, requested_by, requested_comment, processed, processed_by, processed_comment) FROM stdin;
+1	1	944db2b0-a880-4289-b1c2-b7aa98cab1b2	name	Sg	SG	description	APPROVED	t	f	2024-01-02 14:10:10.057	test who	comment	2024-01-02 14:10:10.373	test who	comment
+\.
+
+
+--
+-- TOC entry 2377 (class 0 OID 0)
+-- Dependencies: 206
+-- Name: systemgroup_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.systemgroup_id_seq', 1, true);
+
+
+--
+-- TOC entry 2331 (class 0 OID 16488)
+-- Dependencies: 198
+-- Data for Name: user_notification; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.user_notification (id, notification_type, user_login_name) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2378 (class 0 OID 0)
+-- Dependencies: 197
+-- Name: user_notification_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.user_notification_id_seq', 1, false);
+
+
+--
+-- TOC entry 2328 (class 0 OID 16420)
+-- Dependencies: 195
+-- Data for Name: useraccount; Type: TABLE DATA; Schema: public; Owner: -
+--
+
+COPY public.useraccount (id, version, role, username) FROM stdin;
+\.
+
+
+--
+-- TOC entry 2379 (class 0 OID 0)
+-- Dependencies: 196
+-- Name: useraccount_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
+--
+
+SELECT pg_catalog.setval('public.useraccount_id_seq', 1, false);
+
+
+--
+-- TOC entry 2116 (class 2606 OID 16435)
+-- Name: appinfo appinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.appinfo
+    ADD CONSTRAINT appinfo_pkey PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2118 (class 2606 OID 16437)
+-- Name: device device_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.device
+    ADD CONSTRAINT device_pkey PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2169 (class 2606 OID 16616)
+-- Name: devicegroup devicegroup_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicegroup
+    ADD CONSTRAINT devicegroup_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2120 (class 2606 OID 16439)
+-- Name: devicerevision devicerevision_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicerevision
+    ADD CONSTRAINT devicerevision_pkey PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2178 (class 2606 OID 16618)
+-- Name: devicetype devicetype_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicetype
+    ADD CONSTRAINT devicetype_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2160 (class 2606 OID 16614)
+-- Name: discipline discipline_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.discipline
+    ADD CONSTRAINT discipline_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2190 (class 2606 OID 16620)
+-- Name: name name_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.name
+    ADD CONSTRAINT name_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2122 (class 2606 OID 16441)
+-- Name: namepart namepart_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepart
+    ADD CONSTRAINT namepart_pkey PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2124 (class 2606 OID 16443)
+-- Name: namepartrevision namepartrevision_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepartrevision
+    ADD CONSTRAINT namepartrevision_pkey PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2152 (class 2606 OID 16612)
+-- Name: subsystem subsystem_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.subsystem
+    ADD CONSTRAINT subsystem_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2143 (class 2606 OID 16610)
+-- Name: system system_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.system
+    ADD CONSTRAINT system_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2134 (class 2606 OID 16608)
+-- Name: systemgroup systemgroup_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.systemgroup
+    ADD CONSTRAINT systemgroup_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2128 (class 2606 OID 16493)
+-- Name: user_notification user_notification_pk; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.user_notification
+    ADD CONSTRAINT user_notification_pk PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2126 (class 2606 OID 16445)
+-- Name: useraccount useraccount_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.useraccount
+    ADD CONSTRAINT useraccount_pkey PRIMARY KEY (id);
+
+
+--
+-- TOC entry 2163 (class 1259 OID 16563)
+-- Name: devicegroup_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_deleted_idx ON public.devicegroup USING btree (deleted);
+
+
+--
+-- TOC entry 2164 (class 1259 OID 16558)
+-- Name: devicegroup_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_id_idx ON public.devicegroup USING btree (id);
+
+
+--
+-- TOC entry 2165 (class 1259 OID 16583)
+-- Name: devicegroup_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_latest_idx ON public.devicegroup USING btree (latest);
+
+
+--
+-- TOC entry 2166 (class 1259 OID 16561)
+-- Name: devicegroup_mnemonic_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_mnemonic_idx ON public.devicegroup USING btree (mnemonic);
+
+
+--
+-- TOC entry 2167 (class 1259 OID 16560)
+-- Name: devicegroup_parent_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_parent_uuid_idx ON public.devicegroup USING btree (parent_uuid);
+
+
+--
+-- TOC entry 2170 (class 1259 OID 16562)
+-- Name: devicegroup_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_status_idx ON public.devicegroup USING btree (status);
+
+
+--
+-- TOC entry 2171 (class 1259 OID 16559)
+-- Name: devicegroup_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicegroup_uuid_idx ON public.devicegroup USING btree (uuid);
+
+
+--
+-- TOC entry 2172 (class 1259 OID 16569)
+-- Name: devicetype_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_deleted_idx ON public.devicetype USING btree (deleted);
+
+
+--
+-- TOC entry 2173 (class 1259 OID 16564)
+-- Name: devicetype_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_id_idx ON public.devicetype USING btree (id);
+
+
+--
+-- TOC entry 2174 (class 1259 OID 16584)
+-- Name: devicetype_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_latest_idx ON public.devicetype USING btree (latest);
+
+
+--
+-- TOC entry 2175 (class 1259 OID 16567)
+-- Name: devicetype_mnemonic_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_mnemonic_idx ON public.devicetype USING btree (mnemonic);
+
+
+--
+-- TOC entry 2176 (class 1259 OID 16566)
+-- Name: devicetype_parent_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_parent_uuid_idx ON public.devicetype USING btree (parent_uuid);
+
+
+--
+-- TOC entry 2179 (class 1259 OID 16568)
+-- Name: devicetype_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_status_idx ON public.devicetype USING btree (status);
+
+
+--
+-- TOC entry 2180 (class 1259 OID 16565)
+-- Name: devicetype_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX devicetype_uuid_idx ON public.devicetype USING btree (uuid);
+
+
+--
+-- TOC entry 2155 (class 1259 OID 16557)
+-- Name: discipline_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX discipline_deleted_idx ON public.discipline USING btree (deleted);
+
+
+--
+-- TOC entry 2156 (class 1259 OID 16553)
+-- Name: discipline_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX discipline_id_idx ON public.discipline USING btree (id);
+
+
+--
+-- TOC entry 2157 (class 1259 OID 16582)
+-- Name: discipline_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX discipline_latest_idx ON public.discipline USING btree (latest);
+
+
+--
+-- TOC entry 2158 (class 1259 OID 16555)
+-- Name: discipline_mnemonic_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX discipline_mnemonic_idx ON public.discipline USING btree (mnemonic);
+
+
+--
+-- TOC entry 2161 (class 1259 OID 16556)
+-- Name: discipline_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX discipline_status_idx ON public.discipline USING btree (status);
+
+
+--
+-- TOC entry 2162 (class 1259 OID 16554)
+-- Name: discipline_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX discipline_uuid_idx ON public.discipline USING btree (uuid);
+
+
+--
+-- TOC entry 2181 (class 1259 OID 16576)
+-- Name: name_convention_name_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_convention_name_idx ON public.name USING btree (convention_name);
+
+
+--
+-- TOC entry 2182 (class 1259 OID 16578)
+-- Name: name_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_deleted_idx ON public.name USING btree (deleted);
+
+
+--
+-- TOC entry 2183 (class 1259 OID 16571)
+-- Name: name_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_id_idx ON public.name USING btree (id);
+
+
+--
+-- TOC entry 2184 (class 1259 OID 16585)
+-- Name: name_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_latest_idx ON public.name USING btree (latest);
+
+
+--
+-- TOC entry 2185 (class 1259 OID 16575)
+-- Name: name_namepartrevision_devicetype_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_namepartrevision_devicetype_uuid_idx ON public.name USING btree (devicetype_uuid);
+
+
+--
+-- TOC entry 2186 (class 1259 OID 16574)
+-- Name: name_namepartrevision_subsystem_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_namepartrevision_subsystem_uuid_idx ON public.name USING btree (subsystem_uuid);
+
+
+--
+-- TOC entry 2187 (class 1259 OID 16573)
+-- Name: name_namepartrevision_system_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_namepartrevision_system_uuid_idx ON public.name USING btree (system_uuid);
+
+
+--
+-- TOC entry 2188 (class 1259 OID 16572)
+-- Name: name_namepartrevision_systemgroup_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_namepartrevision_systemgroup_uuid_idx ON public.name USING btree (systemgroup_uuid);
+
+
+--
+-- TOC entry 2191 (class 1259 OID 16577)
+-- Name: name_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_status_idx ON public.name USING btree (status);
+
+
+--
+-- TOC entry 2192 (class 1259 OID 16570)
+-- Name: name_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX name_uuid_idx ON public.name USING btree (uuid);
+
+
+--
+-- TOC entry 2146 (class 1259 OID 16552)
+-- Name: subsystem_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_deleted_idx ON public.subsystem USING btree (deleted);
+
+
+--
+-- TOC entry 2147 (class 1259 OID 16547)
+-- Name: subsystem_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_id_idx ON public.subsystem USING btree (id);
+
+
+--
+-- TOC entry 2148 (class 1259 OID 16581)
+-- Name: subsystem_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_latest_idx ON public.subsystem USING btree (latest);
+
+
+--
+-- TOC entry 2149 (class 1259 OID 16550)
+-- Name: subsystem_mnemonic_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_mnemonic_idx ON public.subsystem USING btree (mnemonic);
+
+
+--
+-- TOC entry 2150 (class 1259 OID 16549)
+-- Name: subsystem_parent_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_parent_uuid_idx ON public.subsystem USING btree (parent_uuid);
+
+
+--
+-- TOC entry 2153 (class 1259 OID 16551)
+-- Name: subsystem_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_status_idx ON public.subsystem USING btree (status);
+
+
+--
+-- TOC entry 2154 (class 1259 OID 16548)
+-- Name: subsystem_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX subsystem_uuid_idx ON public.subsystem USING btree (uuid);
+
+
+--
+-- TOC entry 2137 (class 1259 OID 16546)
+-- Name: system_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_deleted_idx ON public.system USING btree (deleted);
+
+
+--
+-- TOC entry 2138 (class 1259 OID 16541)
+-- Name: system_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_id_idx ON public.system USING btree (id);
+
+
+--
+-- TOC entry 2139 (class 1259 OID 16580)
+-- Name: system_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_latest_idx ON public.system USING btree (latest);
+
+
+--
+-- TOC entry 2140 (class 1259 OID 16544)
+-- Name: system_mnemonic_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_mnemonic_idx ON public.system USING btree (mnemonic);
+
+
+--
+-- TOC entry 2141 (class 1259 OID 16543)
+-- Name: system_parent_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_parent_uuid_idx ON public.system USING btree (parent_uuid);
+
+
+--
+-- TOC entry 2144 (class 1259 OID 16545)
+-- Name: system_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_status_idx ON public.system USING btree (status);
+
+
+--
+-- TOC entry 2145 (class 1259 OID 16542)
+-- Name: system_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX system_uuid_idx ON public.system USING btree (uuid);
+
+
+--
+-- TOC entry 2129 (class 1259 OID 16540)
+-- Name: systemgroup_deleted_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX systemgroup_deleted_idx ON public.systemgroup USING btree (deleted);
+
+
+--
+-- TOC entry 2130 (class 1259 OID 16536)
+-- Name: systemgroup_id_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX systemgroup_id_idx ON public.systemgroup USING btree (id);
+
+
+--
+-- TOC entry 2131 (class 1259 OID 16579)
+-- Name: systemgroup_latest_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX systemgroup_latest_idx ON public.systemgroup USING btree (latest);
+
+
+--
+-- TOC entry 2132 (class 1259 OID 16538)
+-- Name: systemgroup_mnemonic_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX systemgroup_mnemonic_idx ON public.systemgroup USING btree (mnemonic);
+
+
+--
+-- TOC entry 2135 (class 1259 OID 16539)
+-- Name: systemgroup_status_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX systemgroup_status_idx ON public.systemgroup USING btree (status);
+
+
+--
+-- TOC entry 2136 (class 1259 OID 16537)
+-- Name: systemgroup_uuid_idx; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX systemgroup_uuid_idx ON public.systemgroup USING btree (uuid);
+
+
+--
+-- TOC entry 2197 (class 2606 OID 16446)
+-- Name: namepartrevision fk_3f26vetemhujfdm9q74ecr2u5; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepartrevision
+    ADD CONSTRAINT fk_3f26vetemhujfdm9q74ecr2u5 FOREIGN KEY (namepart_id) REFERENCES public.namepart(id);
+
+
+--
+-- TOC entry 2193 (class 2606 OID 16451)
+-- Name: devicerevision fk_4ucnoos7kd8s1gaqbpwm1xptq; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicerevision
+    ADD CONSTRAINT fk_4ucnoos7kd8s1gaqbpwm1xptq FOREIGN KEY (requestedby_id) REFERENCES public.useraccount(id);
+
+
+--
+-- TOC entry 2198 (class 2606 OID 16456)
+-- Name: namepartrevision fk_9vomfk9x1jow27ifx6xc62c5x; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepartrevision
+    ADD CONSTRAINT fk_9vomfk9x1jow27ifx6xc62c5x FOREIGN KEY (processedby_id) REFERENCES public.useraccount(id);
+
+
+--
+-- TOC entry 2199 (class 2606 OID 16461)
+-- Name: namepartrevision fk_9xs5oy86lf0j8ukpjokjipeke; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepartrevision
+    ADD CONSTRAINT fk_9xs5oy86lf0j8ukpjokjipeke FOREIGN KEY (requestedby_id) REFERENCES public.useraccount(id);
+
+
+--
+-- TOC entry 2194 (class 2606 OID 16466)
+-- Name: devicerevision fk_d3ocbsb4tl4ttnusn98khq148; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicerevision
+    ADD CONSTRAINT fk_d3ocbsb4tl4ttnusn98khq148 FOREIGN KEY (devicetype_id) REFERENCES public.namepart(id);
+
+
+--
+-- TOC entry 2195 (class 2606 OID 16471)
+-- Name: devicerevision fk_l7kklb4mxixjs27nsso6shone; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicerevision
+    ADD CONSTRAINT fk_l7kklb4mxixjs27nsso6shone FOREIGN KEY (section_id) REFERENCES public.namepart(id);
+
+
+--
+-- TOC entry 2196 (class 2606 OID 16476)
+-- Name: devicerevision fk_l9r1givkfaiol5or2lnr324xp; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.devicerevision
+    ADD CONSTRAINT fk_l9r1givkfaiol5or2lnr324xp FOREIGN KEY (device_id) REFERENCES public.device(id);
+
+
+--
+-- TOC entry 2200 (class 2606 OID 16481)
+-- Name: namepartrevision fk_lufxqy46l9eiq55d445rbukag; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.namepartrevision
+    ADD CONSTRAINT fk_lufxqy46l9eiq55d445rbukag FOREIGN KEY (parent_id) REFERENCES public.namepart(id);
+
+
+-- Completed on 2024-01-02 15:16:38 CET
+
+--
+-- PostgreSQL database dump complete
+--
+
-- 
GitLab