add chapter repository to postgres.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-03-26 23:50:33 +01:00
parent 525191a0f9
commit 663a95c70d
13 changed files with 420 additions and 5 deletions
@@ -0,0 +1,20 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE story_chapter (
id TEXT NOT NULL PRIMARY KEY,
story_id TEXT NOT NULL,
title TEXT NOT NULL,
author TEXT NOT NULL,
source TEXT NOT NULL,
created_date TIMESTAMP NOT NULL,
fictional_date TIMESTAMP NOT NULL,
edited_date TIMESTAMP NOT NULL,
comment_mode TEXT NOT NULL,
comments_locked BOOLEAN NOT NULL
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE story_chapter;
-- +goose StatementEnd
@@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
CREATE INDEX story_chapter_index_story_id ON story_chapter (story_id);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP INDEX IF EXISTS story_chapter_index_story_id;
-- +goose StatementEnd