github.com/matthieudolci/hatcher@v0.2.8/database/schema.sql (about) 1 SET statement_timeout = 0; 2 SET lock_timeout = 0; 3 SET idle_in_transaction_session_timeout = 0; 4 SET client_encoding = 'UTF8'; 5 SET standard_conforming_strings = on; 6 SELECT pg_catalog.set_config('search_path', '', false); 7 SET check_function_bodies = false; 8 SET client_min_messages = warning; 9 SET row_security = off; 10 11 CREATE SCHEMA hatcher; 12 13 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; 14 15 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; 16 17 SET default_with_oids = false; 18 19 CREATE TABLE hatcher.standupyesterday ( 20 response text, 21 timestamp text, 22 date text, 23 userid text, 24 time text, 25 uuid text, 26 id integer NOT NULL 27 ); 28 29 CREATE SEQUENCE hatcher.standupyesterday_seq 30 AS integer 31 START WITH 1 32 INCREMENT BY 1 33 NO MINVALUE 34 NO MAXVALUE 35 CACHE 1; 36 37 ALTER SEQUENCE hatcher.standupyesterday_seq OWNED BY hatcher.standupyesterday.id; 38 39 CREATE TABLE hatcher.standuptoday ( 40 response text, 41 timestamp text, 42 date text, 43 userid text, 44 time text, 45 uuid text, 46 id integer NOT NULL 47 ); 48 49 CREATE SEQUENCE hatcher.standuptoday_seq 50 AS integer 51 START WITH 1 52 INCREMENT BY 1 53 NO MINVALUE 54 NO MAXVALUE 55 CACHE 1; 56 57 ALTER SEQUENCE hatcher.standuptoday_seq OWNED BY hatcher.standuptoday.id; 58 59 CREATE TABLE hatcher.standupblocker ( 60 response text, 61 timestamp text, 62 date text, 63 userid text, 64 time text, 65 uuid text, 66 id integer NOT NULL 67 ); 68 69 CREATE SEQUENCE hatcher.standupblocker_seq 70 AS integer 71 START WITH 1 72 INCREMENT BY 1 73 NO MINVALUE 74 NO MAXVALUE 75 CACHE 1; 76 77 ALTER SEQUENCE hatcher.standupblocker_seq OWNED BY hatcher.standupblocker.id; 78 79 CREATE TABLE hatcher.users ( 80 id integer NOT NULL, 81 userid text NOT NULL, 82 email text, 83 full_name text, 84 managerid text, 85 ismanager boolean DEFAULT false, 86 displayname text, 87 standup_schedule time without time zone, 88 standup_channel text 89 ); 90 91 CREATE SEQUENCE hatcher.usersid_seq 92 AS integer 93 START WITH 1 94 INCREMENT BY 1 95 NO MINVALUE 96 NO MAXVALUE 97 CACHE 1; 98 99 ALTER SEQUENCE hatcher.usersid_seq OWNED BY hatcher.users.id; 100 101 CREATE TABLE hatcher.standupresults ( 102 id integer NOT NULL, 103 date text, 104 time text, 105 uuid text, 106 timestamp text 107 ); 108 109 CREATE SEQUENCE hatcher.standupresults_seq 110 AS integer 111 START WITH 1 112 INCREMENT BY 1 113 NO MINVALUE 114 NO MAXVALUE 115 CACHE 1; 116 117 ALTER SEQUENCE hatcher.standupresults_seq OWNED BY hatcher.standupresults.id; 118 119 ALTER TABLE ONLY hatcher.users ALTER COLUMN id SET DEFAULT nextval('hatcher.usersid_seq'::regclass); 120 121 ALTER TABLE ONLY hatcher.standupyesterday ALTER COLUMN id SET DEFAULT nextval('hatcher.standupyesterday_seq'::regclass); 122 123 ALTER TABLE ONLY hatcher.standuptoday ALTER COLUMN id SET DEFAULT nextval('hatcher.standuptoday_seq'::regclass); 124 125 ALTER TABLE ONLY hatcher.standupblocker ALTER COLUMN id SET DEFAULT nextval('hatcher.standupblocker_seq'::regclass); 126 127 ALTER TABLE ONLY hatcher.standupresults ALTER COLUMN id SET DEFAULT nextval('hatcher.standupresults_seq'::regclass); 128 129 ALTER TABLE ONLY hatcher.users 130 ADD CONSTRAINT users_pkey PRIMARY KEY (userid); 131