-
Notifications
You must be signed in to change notification settings - Fork 0
/
postgre.sql
33 lines (27 loc) · 829 Bytes
/
postgre.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
-- Database: ChatAPP
-- DROP DATABASE IF EXISTS "ChatAPP";
CREATE DATABASE "ChatAPP"
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'Turkish_Turkey.1254'
LC_CTYPE = 'Turkish_Turkey.1254'
TABLESPACE = pg_default
CONNECTION LIMIT = -1
IS_TEMPLATE = False;
BEGIN;
CREATE TABLE IF NOT EXISTS public.rooms
(
token text COLLATE pg_catalog."default" NOT NULL,
name text COLLATE pg_catalog."default" NOT NULL,
ownerid text COLLATE pg_catalog."default" NOT NULL
);
CREATE TABLE IF NOT EXISTS public.users
(
token text COLLATE pg_catalog."default" NOT NULL,
id text COLLATE pg_catalog."default" NOT NULL,
name text COLLATE pg_catalog."default" NOT NULL,
password text COLLATE pg_catalog."default" NOT NULL,
perm text COLLATE pg_catalog."default" NOT NULL
);
END;