-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
29 lines (26 loc) · 806 Bytes
/
init.sql
File metadata and controls
29 lines (26 loc) · 806 Bytes
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
CREATE TYPE public."challengestatus" AS ENUM
('PND', 'BET', 'DEC', 'CMP');
ALTER TYPE public."challengestatus"
OWNER TO "hammy";
CREATE TABLE public."challenges"
(
"Id" integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 ),
"ChallengerId" text NOT NULL,
"ChallengedId" text NOT NULL,
"ChannelId" text NOT NULL,
"StatusMessageId" text,
"Description" text NOT NULL,
"Status" "challengestatus" NOT NULL,
"BetLimit" bigint,
"ChallengerBet" bigint,
"ChallengedBet" bigint,
"WinnerId" text,
"CreationTimestamp" timestamp with time zone NOT NULL DEFAULT now(),
"CompletedTimestamp" timestamp with time zone,
CONSTRAINT "PRIMARY_KEY" PRIMARY KEY ("Id")
)
WITH (
OIDS = FALSE
);
ALTER TABLE public."challenges"
OWNER to "hammy";