--
-- PostgreSQL database dump
--

-- Dumped from database version 10.4
-- Dumped by pg_dump version 10.4

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 client_min_messages = warning;
SET row_security = off;

--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


--
-- Name: comment_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.comment_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: comments_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.comments_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: fd_comment; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fd_comment (
    id integer NOT NULL,
    poll_id character varying(64) NOT NULL,
    name character varying(64) NOT NULL,
    comment text NOT NULL,
    date timestamp(0) without time zone DEFAULT ((0)::abstime)::timestamp without time zone NOT NULL
);


--
-- Name: fd_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: fd_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.fd_comment_id_seq OWNED BY public.fd_comment.id;


--
-- Name: fd_migration_new; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fd_migration_new (
    version character varying(255) NOT NULL
);


--
-- Name: fd_poll; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fd_poll (
    id character varying(64) NOT NULL,
    admin_id character varying(255) NOT NULL,
    title text NOT NULL,
    description text,
    admin_name character varying(255) NOT NULL,
    admin_mail character varying(255) DEFAULT NULL::character varying,
    creation_date timestamp(0) without time zone DEFAULT '2019-05-02 22:18:17'::timestamp without time zone NOT NULL,
    end_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
    format character varying(255) DEFAULT NULL::character varying,
    editable integer DEFAULT 0 NOT NULL,
    receivenewvotes boolean DEFAULT false NOT NULL,
    active boolean DEFAULT true NOT NULL,
    receivenewcomments boolean DEFAULT false NOT NULL,
    hidden boolean DEFAULT false NOT NULL,
    password_hash character varying(255) DEFAULT NULL::character varying,
    results_publicly_visible boolean,
    valuemax smallint,
    collect_users_mail boolean DEFAULT false NOT NULL,
    collect_users_mail_integer smallint DEFAULT 0 NOT NULL
);


--
-- Name: fd_slot; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fd_slot (
    id integer NOT NULL,
    poll_id character varying(64) NOT NULL,
    title text NOT NULL,
    moments text
);


--
-- Name: fd_slot_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: fd_slot_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.fd_slot_id_seq OWNED BY public.fd_slot.id;


--
-- Name: fd_vote; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.fd_vote (
    id integer NOT NULL,
    poll_id character varying(64) NOT NULL,
    name character varying(255) NOT NULL,
    choices character varying(255) NOT NULL,
    uniqid character varying(16) NOT NULL,
    mail character varying(255) DEFAULT NULL::character varying
);


--
-- Name: fd_vote_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

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


--
-- Name: fd_vote_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.fd_vote_id_seq OWNED BY public.fd_vote.id;


--
-- Name: slot_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.slot_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: user_studs_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.user_studs_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: vote_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.vote_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: fd_comment id; Type: DEFAULT; Schema: public; Owner: -
--

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


--
-- Name: fd_slot id; Type: DEFAULT; Schema: public; Owner: -
--

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


--
-- Name: fd_vote id; Type: DEFAULT; Schema: public; Owner: -
--

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


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

COPY public.fd_comment (id, poll_id, name, comment, date) FROM stdin;
\.


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

COPY public.fd_migration_new (version) FROM stdin;
20150101000000
20150102000000
20150102100000
20150117000000
20150402000000
20150405000000
20150624000000
20150918000000
20151012075900
20151012082600
20151028000000
20151205000000
20180220000000
20180411000000
20180419170000
20180419180000
20180419190000
20180525110000
\.


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

COPY public.fd_poll (id, admin_id, title, description, admin_name, admin_mail, creation_date, end_date, format, editable, receivenewvotes, active, receivenewcomments, hidden, password_hash, results_publicly_visible, valuemax, collect_users_mail, collect_users_mail_integer) FROM stdin;
\.


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

COPY public.fd_slot (id, poll_id, title, moments) FROM stdin;
\.


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

COPY public.fd_vote (id, poll_id, name, choices, uniqid, mail) FROM stdin;
\.


--
-- Name: comment_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: comments_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: fd_comment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: fd_slot_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: fd_vote_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: slot_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: user_studs_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: vote_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

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


--
-- Name: fd_migration_new fd_migration_new_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.fd_migration_new
    ADD CONSTRAINT fd_migration_new_pkey PRIMARY KEY (version);


--
-- Name: comment_index_id; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX comment_index_id ON public.fd_comment USING btree (id);


--
-- Name: comment_index_poll_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX comment_index_poll_id ON public.fd_comment USING btree (poll_id);


--
-- Name: idx_vote_uniqid; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX idx_vote_uniqid ON public.fd_vote USING btree (uniqid);


--
-- Name: poll_index_id; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX poll_index_id ON public.fd_poll USING btree (id);


--
-- Name: slot_index_id; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX slot_index_id ON public.fd_slot USING btree (id);


--
-- Name: slot_index_poll_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX slot_index_poll_id ON public.fd_slot USING btree (poll_id);


--
-- Name: vote_index_id; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX vote_index_id ON public.fd_vote USING btree (id);


--
-- Name: vote_index_poll_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX vote_index_poll_id ON public.fd_vote USING btree (poll_id);


--
-- PostgreSQL database dump complete
--

