forked from Baratheonly/SDC-QnA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a5d004
commit a7fd792
Showing
7 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "foo", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Baratheonly/SDC-QnA.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/Baratheonly/SDC-QnA/issues" | ||
}, | ||
"homepage": "https://github.com/Baratheonly/SDC-QnA#readme" | ||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
-- Table: public.answers | ||
|
||
-- DROP TABLE IF EXISTS public.answers; | ||
|
||
CREATE TABLE IF NOT EXISTS public.answers | ||
( | ||
id integer NOT NULL DEFAULT nextval('answers_id_seq'::regclass), | ||
question_id bigint NOT NULL, | ||
body character varying(1000) COLLATE pg_catalog."default" NOT NULL, | ||
answerer_name character varying(60) COLLATE pg_catalog."default" NOT NULL, | ||
answerer_email character varying(60) COLLATE pg_catalog."default" NOT NULL, | ||
reported boolean NOT NULL DEFAULT false, | ||
helpful integer NOT NULL DEFAULT 0, | ||
date_written bigint DEFAULT EXTRACT(epoch FROM CURRENT_TIMESTAMP), | ||
"timestamp" timestamp(0) with time zone, | ||
CONSTRAINT answers_pkey PRIMARY KEY (id), | ||
CONSTRAINT question_id FOREIGN KEY (question_id) | ||
REFERENCES public.questions (id) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
NOT VALID | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE IF EXISTS public.answers | ||
OWNER to michaellin; | ||
-- Index: fki_question_id | ||
|
||
-- DROP INDEX IF EXISTS public.fki_question_id; | ||
|
||
CREATE INDEX IF NOT EXISTS fki_question_id | ||
ON public.answers USING btree | ||
(question_id ASC NULLS LAST) | ||
TABLESPACE pg_default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-- Table: public.answers_photos | ||
|
||
-- DROP TABLE IF EXISTS public.answers_photos; | ||
|
||
CREATE TABLE IF NOT EXISTS public.answers_photos | ||
( | ||
id integer NOT NULL DEFAULT nextval('answers_photos_id_seq'::regclass), | ||
answer_id bigint NOT NULL, | ||
url character varying(255) COLLATE pg_catalog."default" NOT NULL, | ||
CONSTRAINT answers_photos_pkey PRIMARY KEY (id), | ||
CONSTRAINT answer_id FOREIGN KEY (answer_id) | ||
REFERENCES public.answers (id) MATCH SIMPLE | ||
ON UPDATE NO ACTION | ||
ON DELETE NO ACTION | ||
NOT VALID | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE IF EXISTS public.answers_photos | ||
OWNER to michaellin; | ||
-- Index: fki_answer_id | ||
|
||
-- DROP INDEX IF EXISTS public.fki_answer_id; | ||
|
||
CREATE INDEX IF NOT EXISTS fki_answer_id | ||
ON public.answers_photos USING btree | ||
(answer_id ASC NULLS LAST) | ||
TABLESPACE pg_default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Table: public.questions | ||
|
||
-- DROP TABLE IF EXISTS public.questions; | ||
|
||
CREATE TABLE IF NOT EXISTS public.questions | ||
( | ||
id integer NOT NULL DEFAULT nextval('questions_id_seq'::regclass), | ||
product_id bigint NOT NULL, | ||
body character varying(1000) COLLATE pg_catalog."default" NOT NULL, | ||
asker_name character varying(60) COLLATE pg_catalog."default" NOT NULL, | ||
asker_email character varying(60) COLLATE pg_catalog."default" NOT NULL, | ||
reported boolean NOT NULL, | ||
helpful integer NOT NULL, | ||
date_written bigint, | ||
"timestamp" timestamp(0) with time zone, | ||
CONSTRAINT questions_pkey PRIMARY KEY (id) | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE IF EXISTS public.questions | ||
OWNER to michaellin; |