]> git.ipfire.org Git - dbl.git/commitdiff
db: Create an empty schema
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Dec 2025 14:49:06 +0000 (14:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Dec 2025 14:49:06 +0000 (14:49 +0000)
This also adds a tool to dump the schema easily.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.sql [new file with mode: 0644]
tools/dump-database-schema.sh [new file with mode: 0755]

diff --git a/src/database.sql b/src/database.sql
new file mode 100644 (file)
index 0000000..a2418f2
--- /dev/null
@@ -0,0 +1,27 @@
+--
+-- PostgreSQL database dump
+--
+
+\restrict pUnZDx0GUxB7H6hGXMrSgK5D3L16cocN5OddcWoL1komxp7bE0cZRegJ3mdzh1j
+
+-- Dumped from database version 17.6 (Debian 17.6-0+deb13u1)
+-- Dumped by pg_dump version 17.6 (Debian 17.6-0+deb13u1)
+
+SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
+SET transaction_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;
+
+--
+-- PostgreSQL database dump complete
+--
+
+\unrestrict pUnZDx0GUxB7H6hGXMrSgK5D3L16cocN5OddcWoL1komxp7bE0cZRegJ3mdzh1j
+
diff --git a/tools/dump-database-schema.sh b/tools/dump-database-schema.sh
new file mode 100755 (executable)
index 0000000..fc0ab62
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+pg_dump --schema-only --no-owner -h dnsbl01.haj.ipfire.org -U dnsbl dnsbl \
+       > src/database.sql