This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
otter-space-sdk/db/migrations/007_create_table_PostReference_2024_06_04.sql
SoXX 751f387b86 feat(db): finalizing migration statements
Signed-off-by: SoXX <soxx@fenpa.ws>
2024-06-04 13:06:38 +02:00

12 lines
295 B
SQL

-- +migrate Up
CREATE TABLE "PostReference"
(
post_id TEXT REFERENCES "Post" (id),
source_id TEXT REFERENCES "Source" (id),
url TEXT NOT NULL UNIQUE,
source_post_id TEXT,
PRIMARY KEY (post_id, source_id)
);
-- +migrate Down
DROP TABLE "PostReference";