76 lines
1.5 KiB
SQL
76 lines
1.5 KiB
SQL
--
|
|
-- PostgreSQL database dump
|
|
--
|
|
|
|
-- Dumped from database version 17.3 (Debian 17.3-3.pgdg120+1)
|
|
-- Dumped by pg_dump version 17.3 (Debian 17.3-3.pgdg120+1)
|
|
|
|
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;
|
|
|
|
--
|
|
-- Name: user_actions; Type: TYPE; Schema: public; Owner: postgres
|
|
--
|
|
|
|
CREATE TYPE public.user_actions AS ENUM (
|
|
'first_entry',
|
|
'registration',
|
|
'login',
|
|
'logout',
|
|
'create_theme',
|
|
'entry_theme',
|
|
'delete_theme',
|
|
'write_message'
|
|
);
|
|
|
|
|
|
ALTER TYPE public.user_actions OWNER TO postgres;
|
|
|
|
SET default_tablespace = '';
|
|
|
|
SET default_table_access_method = heap;
|
|
|
|
--
|
|
-- Name: log; Type: TABLE; Schema: public; Owner: postgres
|
|
--
|
|
|
|
CREATE TABLE public.log (
|
|
id integer NOT NULL,
|
|
user_id integer NOT NULL,
|
|
action public.user_actions NOT NULL,
|
|
datetime timestamp with time zone DEFAULT (now() AT TIME ZONE 'EAST'::text) NOT NULL,
|
|
object_id integer,
|
|
response smallint NOT NULL
|
|
);
|
|
|
|
|
|
ALTER TABLE public.log OWNER TO postgres;
|
|
|
|
--
|
|
-- Data for Name: log; Type: TABLE DATA; Schema: public; Owner: postgres
|
|
--
|
|
|
|
|
|
|
|
--
|
|
-- Name: log log_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
--
|
|
|
|
ALTER TABLE ONLY public.log
|
|
ADD CONSTRAINT log_pk PRIMARY KEY (id);
|
|
|
|
|
|
--
|
|
-- PostgreSQL database dump complete
|
|
--
|
|
|