--
-- PostgreSQL database dump
--

-- Dumped from database version 14.18 (Debian 14.18-1.pgdg120+1)
-- Dumped by pg_dump version 14.18 (Debian 14.18-1.pgdg120+1)

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;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: audit_log; Type: TABLE; Schema: public; Owner: adminuser
--

CREATE TABLE public.audit_log (
    id integer NOT NULL,
    "timestamp" timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    username text NOT NULL,
    action text NOT NULL,
    entity_type text NOT NULL,
    entity_id integer,
    old_values jsonb,
    new_values jsonb,
    ip_address text,
    user_agent text,
    additional_info text
);


ALTER TABLE public.audit_log OWNER TO adminuser;

--
-- Name: audit_log_id_seq; Type: SEQUENCE; Schema: public; Owner: adminuser
--

CREATE SEQUENCE public.audit_log_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.audit_log_id_seq OWNER TO adminuser;

--
-- Name: audit_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adminuser
--

ALTER SEQUENCE public.audit_log_id_seq OWNED BY public.audit_log.id;


--
-- Name: backup_history; Type: TABLE; Schema: public; Owner: adminuser
--

CREATE TABLE public.backup_history (
    id integer NOT NULL,
    filename text NOT NULL,
    filepath text NOT NULL,
    filesize bigint,
    backup_type text NOT NULL,
    status text NOT NULL,
    error_message text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    created_by text NOT NULL,
    tables_count integer,
    records_count integer,
    duration_seconds numeric,
    is_encrypted boolean DEFAULT true
);


ALTER TABLE public.backup_history OWNER TO adminuser;

--
-- Name: backup_history_id_seq; Type: SEQUENCE; Schema: public; Owner: adminuser
--

CREATE SEQUENCE public.backup_history_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.backup_history_id_seq OWNER TO adminuser;

--
-- Name: backup_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adminuser
--

ALTER SEQUENCE public.backup_history_id_seq OWNED BY public.backup_history.id;


--
-- Name: customers; Type: TABLE; Schema: public; Owner: adminuser
--

CREATE TABLE public.customers (
    id integer NOT NULL,
    name text NOT NULL,
    email text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.customers OWNER TO adminuser;

--
-- Name: customers_id_seq; Type: SEQUENCE; Schema: public; Owner: adminuser
--

CREATE SEQUENCE public.customers_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.customers_id_seq OWNER TO adminuser;

--
-- Name: customers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adminuser
--

ALTER SEQUENCE public.customers_id_seq OWNED BY public.customers.id;


--
-- Name: licenses; Type: TABLE; Schema: public; Owner: adminuser
--

CREATE TABLE public.licenses (
    id integer NOT NULL,
    license_key text NOT NULL,
    customer_id integer,
    license_type text NOT NULL,
    valid_from date NOT NULL,
    valid_until date NOT NULL,
    is_active boolean DEFAULT true
);


ALTER TABLE public.licenses OWNER TO adminuser;

--
-- Name: licenses_id_seq; Type: SEQUENCE; Schema: public; Owner: adminuser
--

CREATE SEQUENCE public.licenses_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.licenses_id_seq OWNER TO adminuser;

--
-- Name: licenses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adminuser
--

ALTER SEQUENCE public.licenses_id_seq OWNED BY public.licenses.id;


--
-- Name: login_attempts; Type: TABLE; Schema: public; Owner: adminuser
--

CREATE TABLE public.login_attempts (
    ip_address character varying(45) NOT NULL,
    attempt_count integer DEFAULT 0,
    first_attempt timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    last_attempt timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    blocked_until timestamp without time zone,
    last_username_tried text,
    last_error_message text
);


ALTER TABLE public.login_attempts OWNER TO adminuser;

--
-- Name: sessions; Type: TABLE; Schema: public; Owner: adminuser
--

CREATE TABLE public.sessions (
    id integer NOT NULL,
    license_id integer,
    session_id text NOT NULL,
    ip_address text,
    user_agent text,
    started_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    last_heartbeat timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    ended_at timestamp without time zone,
    is_active boolean DEFAULT true
);


ALTER TABLE public.sessions OWNER TO adminuser;

--
-- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: adminuser
--

CREATE SEQUENCE public.sessions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.sessions_id_seq OWNER TO adminuser;

--
-- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: adminuser
--

ALTER SEQUENCE public.sessions_id_seq OWNED BY public.sessions.id;


--
-- Name: audit_log id; Type: DEFAULT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.audit_log ALTER COLUMN id SET DEFAULT nextval('public.audit_log_id_seq'::regclass);


--
-- Name: backup_history id; Type: DEFAULT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.backup_history ALTER COLUMN id SET DEFAULT nextval('public.backup_history_id_seq'::regclass);


--
-- Name: customers id; Type: DEFAULT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.customers ALTER COLUMN id SET DEFAULT nextval('public.customers_id_seq'::regclass);


--
-- Name: licenses id; Type: DEFAULT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.licenses ALTER COLUMN id SET DEFAULT nextval('public.licenses_id_seq'::regclass);


--
-- Name: sessions id; Type: DEFAULT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.sessions ALTER COLUMN id SET DEFAULT nextval('public.sessions_id_seq'::regclass);


--
-- Data for Name: audit_log; Type: TABLE DATA; Schema: public; Owner: adminuser
--

COPY public.audit_log (id, "timestamp", username, action, entity_type, entity_id, old_values, new_values, ip_address, user_agent, additional_info) FROM stdin;
1	2025-06-07 14:40:45.833151	rac00n	LOGIN	user	\N	\N	\N	172.19.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
2	2025-06-07 14:41:11.190149	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
3	2025-06-07 14:41:17.105596	rac00n	LOGIN	user	\N	\N	\N	172.19.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
4	2025-06-07 15:15:06.256545	rac00n	LOGIN	user	\N	\N	\N	172.19.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
5	2025-06-07 15:15:33.972469	rac00n	LOGIN	user	\N	\N	\N	172.19.0.1	curl/8.5.0	Erfolgreiche Anmeldung
6	2025-06-07 15:15:34.109986	rac00n	BACKUP	database	1	\N	\N	172.19.0.1	curl/8.5.0	Backup erstellt: backup_v2docker_20250607_151534_encrypted.sql.gz.enc (3640 bytes)
7	2025-06-07 15:15:43.824357	rac00n	LOGIN	user	\N	\N	\N	172.19.0.1	curl/8.5.0	Erfolgreiche Anmeldung
8	2025-06-07 15:15:43.912466	rac00n	BACKUP	database	2	\N	\N	172.19.0.1	curl/8.5.0	Backup erstellt: backup_v2docker_20250607_151543_encrypted.sql.gz.enc (3768 bytes)
9	2025-06-07 15:16:23.724322	rac00n	DOWNLOAD	backup	2	\N	\N	172.19.0.1	curl/8.5.0	Backup heruntergeladen: backup_v2docker_20250607_151543_encrypted.sql.gz.enc
76	2025-06-08 07:55:31.892854	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
78	2025-06-08 07:59:05.01361	rac00n	DOWNLOAD	backup	5	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Backup heruntergeladen: backup_v2docker_20250608_075834_encrypted.sql.gz.enc
80	2025-06-08 08:06:18.479631	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/28.0 Chrome/130.0.0.0 Mobile Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
82	2025-06-08 14:36:01.730846	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
84	2025-06-08 16:13:31.837749	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
86	2025-06-08 17:47:45.942574	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	python-requests/2.31.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
10	2025-06-07 17:01:30.363152	w@rh@mm3r	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
11	2025-06-07 17:11:08.302021	w@rh@mm3r	LOGIN	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
12	2025-06-07 17:11:10.058681	w@rh@mm3r	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
13	2025-06-07 17:11:17.726581	rac00n	LOGIN	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
14	2025-06-07 17:37:01.770454	rac00n	LOGIN	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
15	2025-06-07 17:45:53.454599	rac00n	LOGIN	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung
16	2025-06-07 17:46:45.804984	rac00n	BACKUP	database	3	\N	\N	172.19.0.5	curl/8.5.0	Backup erstellt: backup_v2docker_20250607_174645_encrypted.sql.gz.enc (4108 bytes)
17	2025-06-07 17:54:25.805772	rac00n	LOGIN	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
18	2025-06-07 17:54:30.18286	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
19	2025-06-07 18:02:18.1851	rac00n	LOGIN	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung
20	2025-06-07 18:55:11.584957	system	LOGIN_FAILED	user	\N	\N	\N	172.19.0.5	curl/8.5.0	IP: 172.19.0.1, User: testuser, Message: YOU FAILED
21	2025-06-07 18:55:13.112779	system	LOGIN_FAILED	user	\N	\N	\N	172.19.0.5	curl/8.5.0	IP: 172.19.0.1, User: testuser, Message: WRONG! 🚫
22	2025-06-07 19:00:59.418824	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
23	2025-06-07 19:01:54.566099	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
24	2025-06-07 19:03:45.046523	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
25	2025-06-07 19:31:13.237177	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
26	2025-06-07 19:32:20.003266	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
27	2025-06-07 19:33:26.379968	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
28	2025-06-07 19:34:09.072085	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
29	2025-06-07 19:36:17.489882	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
30	2025-06-07 19:44:27.078563	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
31	2025-06-07 19:51:17.993707	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
32	2025-06-07 19:58:17.448169	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
33	2025-06-07 19:58:52.291492	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
34	2025-06-07 20:03:15.20645	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
35	2025-06-07 20:05:19.654401	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
36	2025-06-07 20:11:25.331298	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
37	2025-06-07 20:49:37.631513	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
38	2025-06-07 20:52:27.354576	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
39	2025-06-07 20:52:27.38643	rac00n	EXPORT	license	\N	\N	\N	172.19.0.5	curl/8.5.0	Export aller Lizenzen als CSV
40	2025-06-07 20:54:04.783715	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
41	2025-06-07 20:56:50.950356	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
42	2025-06-07 21:06:51.653154	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	curl/8.5.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
43	2025-06-07 21:12:07.627636	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
44	2025-06-07 21:45:19.164825	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
45	2025-06-07 21:56:57.616336	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
46	2025-06-07 21:58:35.15561	rac00n	CREATE	license	1	\N	{"valid_from": "2025-06-07", "license_key": "AF-202506T-75R4-9M9H-DFEY", "valid_until": "2025-06-13", "license_type": "test", "customer_name": "Demo Firma GmbH", "customer_email": "demo@firma.de"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
47	2025-06-07 22:01:01.548875	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
48	2025-06-07 22:01:28.294051	rac00n	CREATE	license	2	\N	{"valid_from": "2025-06-07", "license_key": "AF-202506T-3DF2-ELJN-RQDR", "valid_until": "2025-06-20", "license_type": "test", "customer_name": "Test Kunde", "customer_email": "test@example.com"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
49	2025-06-07 22:19:17.155373	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
50	2025-06-07 22:19:29.307415	rac00n	CREATE	license	3	\N	{"valid_from": "2025-06-07", "license_key": "AF-202506F-CRS3-PL6W-9CCP", "valid_until": "2026-06-06", "license_type": "full", "customer_name": "Test vor Restore", "customer_email": "test@restore.de"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
51	2025-06-07 22:19:36.9697	rac00n	CREATE	license	4	\N	{"valid_from": "2025-06-07", "license_key": "AF-202506F-GGKA-CJKV-P2PF", "valid_until": "2026-06-06", "license_type": "full", "customer_name": "Test vor Restore", "customer_email": "test@restore.de"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
52	2025-06-07 22:19:51.747722	rac00n	CREATE_BATCH	license	\N	\N	{"type": "full", "customer": "Müller GmbH & Co. KG", "quantity": 10}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Batch-Generierung von 10 Lizenzen
53	2025-06-07 22:23:56.496775	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
54	2025-06-07 22:24:29.52332	rac00n	UPDATE	customer	4	{"name": "Demo Firma GmbH", "email": "demo@firma.de"}	{"name": "Demo Firma GmbH oder so ähnlich", "email": "demo@firma.de"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
55	2025-06-07 22:24:53.387461	rac00n	UPDATE	license	14	{"is_active": true, "valid_from": "2025-06-07", "license_key": "AF-202506F-Z6KT-QY28-CTZ9", "valid_until": "2026-06-06", "license_type": "full"}	{"is_active": false, "valid_from": "2025-06-07", "license_key": "AF-202506F-Z6KT-QY28-CTZ9", "valid_until": "2026-06-06", "license_type": "full"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
56	2025-06-07 22:25:42.636503	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
57	2025-06-07 22:26:04.176345	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
58	2025-06-07 22:32:36.918402	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
59	2025-06-07 22:33:04.289738	rac00n	UPDATE	license	12	{"is_active": true, "valid_from": "2025-06-07", "license_key": "AF-202506F-F6E8-2KXL-7GVB", "valid_until": "2026-06-06", "license_type": "full"}	{"is_active": false, "valid_from": "2025-06-07", "license_key": "AF-202506F-F6E8-2KXL-7GVB", "valid_until": "2026-06-06", "license_type": "full"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
60	2025-06-07 22:37:11.24327	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
61	2025-06-07 22:40:11.528994	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
62	2025-06-07 23:02:03.858286	system	LOGIN_FAILED	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	IP: 172.19.0.1, User: rac00n, Message: YOU FAILED
63	2025-06-07 23:02:13.590411	system	LOGIN_FAILED	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	IP: 172.19.0.1, User: rac00n, Message: COMPUTER SAYS NO
64	2025-06-07 23:18:04.017897	system	LOGIN_FAILED	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	IP: 172.19.0.1, User: rac00n, Message: NOPE!
65	2025-06-07 23:18:45.316866	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
66	2025-06-07 23:24:10.758514	rac00n	CREATE	customer	6	\N	{"name": "Bli Bla Blub GmbH", "email": "test@bliblablu.info"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
67	2025-06-07 23:24:10.763695	rac00n	CREATE	license	15	\N	{"valid_from": "2025-06-08", "license_key": "AF-202506T-R5TC-9KT3-ZPRD", "valid_until": "2025-07-07", "license_type": "full", "customer_name": "Bli Bla Blub GmbH", "customer_email": "test@bliblablu.info"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
68	2025-06-07 23:25:25.589172	rac00n	UPDATE	license	14	{"is_active": false, "valid_from": "2025-06-07", "license_key": "AF-202506F-Z6KT-QY28-CTZ9", "valid_until": "2026-06-06", "license_type": "full"}	{"is_active": false, "valid_from": "2025-06-07", "license_key": "AF-202506F-Z6KT-QY28-CTZ9", "valid_until": "2026-06-06", "license_type": "full"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
69	2025-06-07 23:25:33.134625	rac00n	UPDATE	license	11	{"is_active": true, "valid_from": "2025-06-07", "license_key": "AF-202506F-A6BV-6KAX-KU4J", "valid_until": "2026-06-06", "license_type": "full"}	{"is_active": false, "valid_from": "2025-06-07", "license_key": "AF-202506F-A6BV-6KAX-KU4J", "valid_until": "2026-06-06", "license_type": "full"}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
70	2025-06-07 23:25:52.026955	rac00n	DELETE	license	14	{"license_key": "AF-202506F-Z6KT-QY28-CTZ9", "license_type": "full", "customer_name": "Müller GmbH & Co. KG"}	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
71	2025-06-07 23:26:34.32667	rac00n	DELETE	customer	5	{"name": "Max Mustermann", "email": "max@mustermann.de"}	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	\N
72	2025-06-07 23:27:11.170417	rac00n	CREATE_BATCH	license	\N	\N	{"type": "full", "customer": "Bli Bla Blub GmbH", "quantity": 5}	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Batch-Generierung von 5 Lizenzen
73	2025-06-07 23:28:45.926809	rac00n	BACKUP	database	4	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Backup erstellt: backup_v2docker_20250607_232845_encrypted.sql.gz.enc (7116 bytes)
74	2025-06-07 23:29:10.885674	rac00n	DOWNLOAD	backup	4	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Backup heruntergeladen: backup_v2docker_20250607_232845_encrypted.sql.gz.enc
75	2025-06-08 07:55:19.354464	system	LOGIN_FAILED	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	IP: 172.19.0.1, User: rac00n, Message: NOPE!
77	2025-06-08 07:58:34.270119	rac00n	BACKUP	database	5	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Backup erstellt: backup_v2docker_20250608_075834_encrypted.sql.gz.enc (7308 bytes)
79	2025-06-08 07:59:21.636378	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
81	2025-06-08 08:51:01.683507	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/28.0 Chrome/130.0.0.0 Mobile Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
83	2025-06-08 14:36:24.980042	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
85	2025-06-08 17:21:27.353725	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
87	2025-06-08 17:49:18.527739	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	python-requests/2.31.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
88	2025-06-08 17:49:31.018007	rac00n	BACKUP	database	6	\N	\N	172.19.0.5	python-requests/2.31.0	Backup erstellt: backup_v2docker_20250608_174930_encrypted.sql.gz.enc (7692 bytes)
89	2025-06-08 17:50:12.342288	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	python-requests/2.31.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
90	2025-06-08 18:01:50.515914	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
91	2025-06-08 18:02:24.836845	rac00n	BACKUP	database	7	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Backup erstellt: backup_v2docker_20250608_200224_encrypted.sql.gz.enc (7864 bytes)
92	2025-06-08 18:02:35.914193	rac00n	LOGOUT	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Abmeldung
93	2025-06-08 18:04:57.805724	system	LOGOUT	user	\N	\N	\N	172.19.0.5	python-requests/2.31.0	Abmeldung
94	2025-06-08 18:04:59.88908	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	python-requests/2.31.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
95	2025-06-08 18:06:51.462396	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	python-requests/2.31.0	Erfolgreiche Anmeldung von IP: 172.19.0.1
96	2025-06-08 18:10:13.065749	rac00n	LOGIN_SUCCESS	user	\N	\N	\N	172.19.0.5	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36	Erfolgreiche Anmeldung von IP: 172.19.0.1
\.


--
-- Data for Name: backup_history; Type: TABLE DATA; Schema: public; Owner: adminuser
--

COPY public.backup_history (id, filename, filepath, filesize, backup_type, status, error_message, created_at, created_by, tables_count, records_count, duration_seconds, is_encrypted) FROM stdin;
1	backup_v2docker_20250607_151534_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250607_151534_encrypted.sql.gz.enc	3640	manual	success	\N	2025-06-07 15:15:34.003903	rac00n	5	6	0.1055765151977539	t
2	backup_v2docker_20250607_151543_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250607_151543_encrypted.sql.gz.enc	3768	manual	success	\N	2025-06-07 15:15:43.853153	rac00n	5	9	0.058580875396728516	t
3	backup_v2docker_20250607_174645_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250607_174645_encrypted.sql.gz.enc	4108	manual	success	\N	2025-06-07 17:46:45.701839	rac00n	5	19	0.10155487060546875	t
4	backup_v2docker_20250607_232845_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250607_232845_encrypted.sql.gz.enc	7116	manual	success	\N	2025-06-07 23:28:45.823584	rac00n	6	102	0.10189580917358398	t
5	backup_v2docker_20250608_075834_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250608_075834_encrypted.sql.gz.enc	7308	manual	success	\N	2025-06-08 07:58:34.205649	rac00n	6	107	0.06303167343139648	t
6	backup_v2docker_20250608_174930_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250608_174930_encrypted.sql.gz.enc	7692	manual	success	\N	2025-06-08 17:49:30.953077	rac00n	6	119	0.06305289268493652	t
7	backup_v2docker_20250608_200224_encrypted.sql.gz.enc	/app/backups/backup_v2docker_20250608_200224_encrypted.sql.gz.enc	7864	manual	success	\N	2025-06-08 18:02:24.771159	rac00n	6	123	0.06486988067626953	t
\.


--
-- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: adminuser
--

COPY public.customers (id, name, email, created_at) FROM stdin;
1	Müller GmbH & Co. KG	kontakt@müller-köln.de	2025-06-07 14:39:21.554354
2	Test vor Restore	test@restore.de	2025-06-07 15:16:51.26188
3	Test Kunde	test@example.com	2025-06-07 21:43:48.308699
4	Demo Firma GmbH oder so ähnlich	demo@firma.de	2025-06-07 21:43:48.308699
6	Bli Bla Blub GmbH	test@bliblablu.info	2025-06-07 23:24:10.753449
\.


--
-- Data for Name: licenses; Type: TABLE DATA; Schema: public; Owner: adminuser
--

COPY public.licenses (id, license_key, customer_id, license_type, valid_from, valid_until, is_active) FROM stdin;
1	AF-202506T-75R4-9M9H-DFEY	4	test	2025-06-07	2025-06-13	t
2	AF-202506T-3DF2-ELJN-RQDR	3	test	2025-06-07	2025-06-20	t
3	AF-202506F-CRS3-PL6W-9CCP	2	full	2025-06-07	2026-06-06	t
4	AF-202506F-GGKA-CJKV-P2PF	2	full	2025-06-07	2026-06-06	t
5	AF-202506F-FDZQ-MH3T-6EWP	1	full	2025-06-07	2026-06-06	t
6	AF-202506F-QYM9-58NT-SRCV	1	full	2025-06-07	2026-06-06	t
7	AF-202506F-9AVT-SY3C-KZ6H	1	full	2025-06-07	2026-06-06	t
8	AF-202506F-TS34-U93G-X74Y	1	full	2025-06-07	2026-06-06	t
9	AF-202506F-PC2K-SPEC-9MDS	1	full	2025-06-07	2026-06-06	t
10	AF-202506F-R2VL-J7YF-6XLA	1	full	2025-06-07	2026-06-06	t
13	AF-202506F-JU47-AS8Y-8VFP	1	full	2025-06-07	2026-06-06	t
12	AF-202506F-F6E8-2KXL-7GVB	1	full	2025-06-07	2026-06-06	f
15	AF-202506T-R5TC-9KT3-ZPRD	6	full	2025-06-08	2025-07-07	t
11	AF-202506F-A6BV-6KAX-KU4J	1	full	2025-06-07	2026-06-06	f
16	AF-202506F-F4WM-RUBG-RR7A	6	full	2025-06-08	2025-07-07	t
17	AF-202506F-ZFYY-D2ZG-9D2B	6	full	2025-06-08	2025-07-07	t
18	AF-202506F-KS7T-Z676-7V5L	6	full	2025-06-08	2025-07-07	t
19	AF-202506F-3NJ4-X5ET-RWY2	6	full	2025-06-08	2025-07-07	t
20	AF-202506F-B984-PHN6-BUDX	6	full	2025-06-08	2025-07-07	t
\.


--
-- Data for Name: login_attempts; Type: TABLE DATA; Schema: public; Owner: adminuser
--

COPY public.login_attempts (ip_address, attempt_count, first_attempt, last_attempt, blocked_until, last_username_tried, last_error_message) FROM stdin;
192.168.1.50	3	2025-06-07 18:56:54.538998	2025-06-07 18:56:54.538998	2025-06-07 20:56:54.538998	attacker1	NOPE\\!
10.0.0.25	5	2025-06-07 18:56:54.538998	2025-06-07 18:56:54.538998	2025-06-08 14:56:54.538998	scanner	ACCESS DENIED, TRY HARDER
192.168.100.200	7	2025-06-07 18:56:54.538998	2025-06-07 18:56:54.538998	2025-06-08 17:56:54.538998	brute_forcer	YOU FAILED
\.


--
-- Data for Name: sessions; Type: TABLE DATA; Schema: public; Owner: adminuser
--

COPY public.sessions (id, license_id, session_id, ip_address, user_agent, started_at, last_heartbeat, ended_at, is_active) FROM stdin;
\.


--
-- Name: audit_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: adminuser
--

SELECT pg_catalog.setval('public.audit_log_id_seq', 96, true);


--
-- Name: backup_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: adminuser
--

SELECT pg_catalog.setval('public.backup_history_id_seq', 7, true);


--
-- Name: customers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: adminuser
--

SELECT pg_catalog.setval('public.customers_id_seq', 6, true);


--
-- Name: licenses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: adminuser
--

SELECT pg_catalog.setval('public.licenses_id_seq', 20, true);


--
-- Name: sessions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: adminuser
--

SELECT pg_catalog.setval('public.sessions_id_seq', 1, false);


--
-- Name: audit_log audit_log_pkey; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.audit_log
    ADD CONSTRAINT audit_log_pkey PRIMARY KEY (id);


--
-- Name: backup_history backup_history_pkey; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.backup_history
    ADD CONSTRAINT backup_history_pkey PRIMARY KEY (id);


--
-- Name: customers customers_pkey; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.customers
    ADD CONSTRAINT customers_pkey PRIMARY KEY (id);


--
-- Name: licenses licenses_license_key_key; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.licenses
    ADD CONSTRAINT licenses_license_key_key UNIQUE (license_key);


--
-- Name: licenses licenses_pkey; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.licenses
    ADD CONSTRAINT licenses_pkey PRIMARY KEY (id);


--
-- Name: login_attempts login_attempts_pkey; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.login_attempts
    ADD CONSTRAINT login_attempts_pkey PRIMARY KEY (ip_address);


--
-- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.sessions
    ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);


--
-- Name: sessions sessions_session_id_key; Type: CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.sessions
    ADD CONSTRAINT sessions_session_id_key UNIQUE (session_id);


--
-- Name: idx_audit_log_entity; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_audit_log_entity ON public.audit_log USING btree (entity_type, entity_id);


--
-- Name: idx_audit_log_timestamp; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_audit_log_timestamp ON public.audit_log USING btree ("timestamp" DESC);


--
-- Name: idx_audit_log_username; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_audit_log_username ON public.audit_log USING btree (username);


--
-- Name: idx_backup_history_created_at; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_backup_history_created_at ON public.backup_history USING btree (created_at DESC);


--
-- Name: idx_backup_history_status; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_backup_history_status ON public.backup_history USING btree (status);


--
-- Name: idx_login_attempts_blocked_until; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_login_attempts_blocked_until ON public.login_attempts USING btree (blocked_until);


--
-- Name: idx_login_attempts_last_attempt; Type: INDEX; Schema: public; Owner: adminuser
--

CREATE INDEX idx_login_attempts_last_attempt ON public.login_attempts USING btree (last_attempt DESC);


--
-- Name: licenses licenses_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.licenses
    ADD CONSTRAINT licenses_customer_id_fkey FOREIGN KEY (customer_id) REFERENCES public.customers(id);


--
-- Name: sessions sessions_license_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: adminuser
--

ALTER TABLE ONLY public.sessions
    ADD CONSTRAINT sessions_license_id_fkey FOREIGN KEY (license_id) REFERENCES public.licenses(id);


--
-- PostgreSQL database dump complete
--

