forked from Statcord/Statcord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.postgresql.sql
54 lines (44 loc) · 1.46 KB
/
schema.postgresql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
ALTER SCHEMA public OWNER TO disstat;
COMMENT ON SCHEMA public IS 'standard public schema';
SET default_tablespace = '';
SET default_table_access_method = heap;
CREATE TABLE public.owners (
ownerid character varying NOT NULL,
username character varying NOT NULL
);
ALTER TABLE public.owners OWNER TO disstat;
ALTER TABLE ONLY public.owners
ADD CONSTRAINT owners_pkey PRIMARY KEY (ownerid);
CREATE TABLE public.bots (
botid character varying NOT NULL,
username character varying NOT NULL,
avatar character varying NOT NULL,
token character varying NOT NULL,
public boolean DEFAULT true,
ownerid character varying NOT NULL,
maxcustomcharts integer DEFAULT 2,
addedon timestamp without time zone
);
ALTER TABLE public.bots OWNER TO disstat;
ALTER TABLE ONLY public.bots
ADD CONSTRAINT bots_pkey PRIMARY KEY (botid);
CREATE TABLE public.chartsettings (
botid character varying,
chartid character varying,
enabled boolean DEFAULT true,
name character varying,
label character varying,
PRIMARY KEY (chartid, botid)
);
ALTER TABLE IF EXISTS public.chartsettings
OWNER to disstat;