-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.sql
172 lines (117 loc) · 7.7 KB
/
schema.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.8
-- Dumped by pg_dump version 17rc1
-- ./pg_dump --schema-only --schema=public {POSTGRES_URL} > ~/schema.db
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_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;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: pg_database_owner
--
CREATE SCHEMA public;
ALTER SCHEMA public OWNER TO pg_database_owner;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pg_database_owner
--
COMMENT ON SCHEMA public IS 'standard public schema';
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: attachments; Type: TABLE; Schema: public; Owner: default
--
CREATE TABLE public.attachments (
id bigint NOT NULL,
name character varying(255),
link character varying(1000),
type character varying(255)
);
ALTER TABLE public.attachments OWNER TO "default";
--
-- Name: channels; Type: TABLE; Schema: public; Owner: default
--
CREATE TABLE public.channels (
id bigint NOT NULL,
name character varying(32),
colour bigint
);
ALTER TABLE public.channels OWNER TO "default";
--
-- Name: messages; Type: TABLE; Schema: public; Owner: default
--
CREATE TABLE public.messages (
authorname character varying(40),
authorimage character varying(128),
content character varying(4000),
channel character varying(256),
"time" character varying(10),
uuid character varying(64) NOT NULL,
guildid bigint,
userid character varying(255),
attachments character varying(4000),
edited boolean
);
ALTER TABLE public.messages OWNER TO "default";
--
-- Name: roles; Type: TABLE; Schema: public; Owner: default
--
CREATE TABLE public.roles (
id bigint NOT NULL,
name character varying(32),
colour bigint
);
ALTER TABLE public.roles OWNER TO "default";
--
-- Name: users; Type: TABLE; Schema: public; Owner: default
--
CREATE TABLE public.users (
id bigint NOT NULL,
name character varying(32),
colour bigint
);
ALTER TABLE public.users OWNER TO "default";
--
-- Name: attachments attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: default
--
ALTER TABLE ONLY public.attachments
ADD CONSTRAINT attachments_pkey PRIMARY KEY (id);
--
-- Name: channels channels_pkey; Type: CONSTRAINT; Schema: public; Owner: default
--
ALTER TABLE ONLY public.channels
ADD CONSTRAINT channels_pkey PRIMARY KEY (id);
--
-- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: default
--
ALTER TABLE ONLY public.messages
ADD CONSTRAINT messages_pkey PRIMARY KEY (uuid);
--
-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: default
--
ALTER TABLE ONLY public.roles
ADD CONSTRAINT roles_pkey PRIMARY KEY (id);
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: default
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: cloud_admin
--
ALTER DEFAULT PRIVILEGES FOR ROLE cloud_admin IN SCHEMA public GRANT ALL ON SEQUENCES TO neon_superuser WITH GRANT OPTION;
--
-- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: cloud_admin
--
ALTER DEFAULT PRIVILEGES FOR ROLE cloud_admin IN SCHEMA public GRANT SELECT,INSERT,REFERENCES,DELETE,TRIGGER,TRUNCATE,UPDATE ON TABLES TO neon_superuser WITH GRANT OPTION;
--
-- PostgreSQL database dump complete
--