212 lines
4.5 KiB
Plaintext
212 lines
4.5 KiB
Plaintext
--
|
|
-- PostgreSQL database dump
|
|
--
|
|
|
|
-- Dumped from database version 13.8 (Debian 13.8-0+deb11u1)
|
|
-- Dumped by pg_dump version 14.5
|
|
|
|
SET statement_timeout = 0;
|
|
SET lock_timeout = 0;
|
|
SET idle_in_transaction_session_timeout = 0;
|
|
SET client_encoding = 'SQL_ASCII';
|
|
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;
|
|
|
|
SET default_tablespace = '';
|
|
|
|
SET default_table_access_method = heap;
|
|
|
|
--
|
|
-- Name: inventory; Type: TABLE; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
CREATE TABLE public.inventory (
|
|
id uuid DEFAULT gen_random_uuid() NOT NULL,
|
|
serial character varying,
|
|
innenauftrag character varying NOT NULL,
|
|
description character varying NOT NULL,
|
|
oe integer NOT NULL,
|
|
location text NOT NULL,
|
|
purchase_date timestamp with time zone NOT NULL,
|
|
purchase_price money NOT NULL,
|
|
old_inventory_id character varying
|
|
);
|
|
|
|
|
|
ALTER TABLE public.inventory OWNER TO adnidor;
|
|
|
|
--
|
|
-- Name: organizational_units; Type: TABLE; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
CREATE TABLE public.organizational_units (
|
|
id integer NOT NULL,
|
|
name integer NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.organizational_units OWNER TO adnidor;
|
|
|
|
--
|
|
-- Name: permissions; Type: TABLE; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
CREATE TABLE public.permissions (
|
|
id integer NOT NULL,
|
|
"user" integer NOT NULL,
|
|
oe integer,
|
|
permission character varying NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.permissions OWNER TO adnidor;
|
|
|
|
--
|
|
-- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
CREATE SEQUENCE public.permissions_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.permissions_id_seq OWNER TO adnidor;
|
|
|
|
--
|
|
-- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER SEQUENCE public.permissions_id_seq OWNED BY public.permissions.id;
|
|
|
|
|
|
--
|
|
-- Name: users; Type: TABLE; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
CREATE TABLE public.users (
|
|
id integer NOT NULL,
|
|
username character varying NOT NULL,
|
|
full_name character varying NOT NULL,
|
|
password character varying NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.users OWNER TO adnidor;
|
|
|
|
--
|
|
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
CREATE SEQUENCE public.users_id_seq
|
|
AS integer
|
|
START WITH 1
|
|
INCREMENT BY 1
|
|
NO MINVALUE
|
|
NO MAXVALUE
|
|
CACHE 1;
|
|
|
|
|
|
ALTER TABLE public.users_id_seq OWNER TO adnidor;
|
|
|
|
--
|
|
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
|
|
|
|
|
|
--
|
|
-- Name: permissions id; Type: DEFAULT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.permissions ALTER COLUMN id SET DEFAULT nextval('public.permissions_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: users id; Type: DEFAULT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
|
|
|
|
|
|
--
|
|
-- Name: inventory inventory_id; Type: CONSTRAINT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.inventory
|
|
ADD CONSTRAINT inventory_id PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: organizational_units organizational_units_id; Type: CONSTRAINT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.organizational_units
|
|
ADD CONSTRAINT organizational_units_id PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: permissions permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.permissions
|
|
ADD CONSTRAINT permissions_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.users
|
|
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- Name: inventory inventory_oe_fkey; Type: FK CONSTRAINT; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
ALTER TABLE ONLY public.inventory
|
|
ADD CONSTRAINT inventory_oe_fkey FOREIGN KEY (oe) REFERENCES public.organizational_units(id);
|
|
|
|
|
|
--
|
|
-- Name: TABLE inventory; Type: ACL; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
GRANT ALL ON TABLE public.inventory TO adnidor_static;
|
|
|
|
|
|
--
|
|
-- Name: TABLE organizational_units; Type: ACL; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
GRANT ALL ON TABLE public.organizational_units TO adnidor_static;
|
|
|
|
|
|
--
|
|
-- Name: TABLE permissions; Type: ACL; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
GRANT ALL ON TABLE public.permissions TO adnidor_static;
|
|
|
|
|
|
--
|
|
-- Name: TABLE users; Type: ACL; Schema: public; Owner: adnidor
|
|
--
|
|
|
|
GRANT ALL ON TABLE public.users TO adnidor_static;
|
|
|
|
|
|
--
|
|
-- PostgreSQL database dump complete
|
|
--
|
|
|