athletes.sql (2880B)
1 -- 2 -- PostgreSQL database dump 3 -- 4 5 -- Dumped from database version 15.1 6 -- Dumped by pg_dump version 15.3 7 8 SET statement_timeout = 0; 9 SET lock_timeout = 0; 10 SET idle_in_transaction_session_timeout = 0; 11 SET client_encoding = 'UTF8'; 12 SET standard_conforming_strings = on; 13 SELECT pg_catalog.set_config('search_path', '', false); 14 SET check_function_bodies = false; 15 SET xmloption = content; 16 SET client_min_messages = warning; 17 SET row_security = off; 18 19 SET default_tablespace = ''; 20 21 SET default_table_access_method = heap; 22 23 -- 24 -- Name: athletes; Type: TABLE; Schema: public; Owner: postgres 25 -- 26 27 CREATE TABLE public.athletes ( 28 id bigint NOT NULL, 29 created_at timestamp with time zone DEFAULT now(), 30 nr bigint, 31 firstname text NOT NULL, 32 lastname text, 33 birthday date, 34 school text, 35 CONSTRAINT athletes_firstname_check CHECK ((length(firstname) > 0)) 36 ); 37 38 39 ALTER TABLE public.athletes OWNER TO postgres; 40 41 -- 42 -- Name: TABLE athletes; Type: COMMENT; Schema: public; Owner: postgres 43 -- 44 45 COMMENT ON TABLE public.athletes IS 'Startlist with athletes'; 46 47 48 -- 49 -- Name: athletes_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 50 -- 51 52 ALTER TABLE public.athletes ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( 53 SEQUENCE NAME public.athletes_id_seq 54 START WITH 1 55 INCREMENT BY 1 56 NO MINVALUE 57 NO MAXVALUE 58 CACHE 1 59 ); 60 61 62 -- 63 -- Name: athletes athletes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres 64 -- 65 66 ALTER TABLE ONLY public.athletes 67 ADD CONSTRAINT athletes_pkey PRIMARY KEY (id); 68 69 70 -- 71 -- Name: athletes Enable delete for authenticated users only; Type: POLICY; Schema: public; Owner: postgres 72 -- 73 74 CREATE POLICY "Enable delete for authenticated users only" ON public.athletes FOR DELETE TO authenticated USING (true); 75 76 77 -- 78 -- Name: athletes Enable insert for authenticated users only; Type: POLICY; Schema: public; Owner: postgres 79 -- 80 81 CREATE POLICY "Enable insert for authenticated users only" ON public.athletes FOR INSERT TO authenticated WITH CHECK (true); 82 83 84 -- 85 -- Name: athletes Enable read access for all users; Type: POLICY; Schema: public; Owner: postgres 86 -- 87 88 CREATE POLICY "Enable read access for all users" ON public.athletes FOR SELECT USING (true); 89 90 91 -- 92 -- Name: athletes; Type: ROW SECURITY; Schema: public; Owner: postgres 93 -- 94 95 ALTER TABLE public.athletes ENABLE ROW LEVEL SECURITY; 96 97 -- 98 -- Name: TABLE athletes; Type: ACL; Schema: public; Owner: postgres 99 -- 100 101 GRANT ALL ON TABLE public.athletes TO anon; 102 GRANT ALL ON TABLE public.athletes TO authenticated; 103 GRANT ALL ON TABLE public.athletes TO service_role; 104 105 106 -- 107 -- Name: SEQUENCE athletes_id_seq; Type: ACL; Schema: public; Owner: postgres 108 -- 109 110 GRANT ALL ON SEQUENCE public.athletes_id_seq TO anon; 111 GRANT ALL ON SEQUENCE public.athletes_id_seq TO authenticated; 112 GRANT ALL ON SEQUENCE public.athletes_id_seq TO service_role; 113 114 115 -- 116 -- PostgreSQL database dump complete 117 -- 118