myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

heats.sql (2775B)


      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: heats; Type: TABLE; Schema: public; Owner: postgres
     25 --
     26 
     27 CREATE TABLE public.heats (
     28     id bigint NOT NULL,
     29     created_at timestamp with time zone DEFAULT now(),
     30     name text NOT NULL,
     31     location text,
     32     planned_start time without time zone,
     33     CONSTRAINT heats_name_check CHECK ((length(name) > 0))
     34 );
     35 
     36 
     37 ALTER TABLE public.heats OWNER TO postgres;
     38 
     39 --
     40 -- Name: TABLE heats; Type: COMMENT; Schema: public; Owner: postgres
     41 --
     42 
     43 COMMENT ON TABLE public.heats IS 'List of heats or contest runs';
     44 
     45 
     46 --
     47 -- Name: heats_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
     48 --
     49 
     50 ALTER TABLE public.heats ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY (
     51     SEQUENCE NAME public.heats_id_seq
     52     START WITH 1
     53     INCREMENT BY 1
     54     NO MINVALUE
     55     NO MAXVALUE
     56     CACHE 1
     57 );
     58 
     59 
     60 --
     61 -- Name: heats heats_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
     62 --
     63 
     64 ALTER TABLE ONLY public.heats
     65     ADD CONSTRAINT heats_pkey PRIMARY KEY (id);
     66 
     67 
     68 --
     69 -- Name: heats Enable delete for authenticated users only; Type: POLICY; Schema: public; Owner: postgres
     70 --
     71 
     72 CREATE POLICY "Enable delete for authenticated users only" ON public.heats FOR DELETE TO authenticated USING (true);
     73 
     74 
     75 --
     76 -- Name: heats Enable insert for authenticated users only; Type: POLICY; Schema: public; Owner: postgres
     77 --
     78 
     79 CREATE POLICY "Enable insert for authenticated users only" ON public.heats FOR INSERT TO authenticated WITH CHECK (true);
     80 
     81 
     82 --
     83 -- Name: heats Enable read access for all users; Type: POLICY; Schema: public; Owner: postgres
     84 --
     85 
     86 CREATE POLICY "Enable read access for all users" ON public.heats FOR SELECT USING (true);
     87 
     88 
     89 --
     90 -- Name: heats; Type: ROW SECURITY; Schema: public; Owner: postgres
     91 --
     92 
     93 ALTER TABLE public.heats ENABLE ROW LEVEL SECURITY;
     94 
     95 --
     96 -- Name: TABLE heats; Type: ACL; Schema: public; Owner: postgres
     97 --
     98 
     99 GRANT ALL ON TABLE public.heats TO anon;
    100 GRANT ALL ON TABLE public.heats TO authenticated;
    101 GRANT ALL ON TABLE public.heats TO service_role;
    102 
    103 
    104 --
    105 -- Name: SEQUENCE heats_id_seq; Type: ACL; Schema: public; Owner: postgres
    106 --
    107 
    108 GRANT ALL ON SEQUENCE public.heats_id_seq TO anon;
    109 GRANT ALL ON SEQUENCE public.heats_id_seq TO authenticated;
    110 GRANT ALL ON SEQUENCE public.heats_id_seq TO service_role;
    111 
    112 
    113 --
    114 -- PostgreSQL database dump complete
    115 --
    116