yans/internal/backend/sqlite/migrations/002_attachments.sql
2022-04-12 03:29:22 +03:00

11 lines
254 B
SQL

-- +goose Up
CREATE TABLE IF NOT EXISTS attachments_articles_mapping (
article_id INTEGER REFERENCES articles(id),
content_type TEXT NOT NULL,
attachment_id TEXT NOT NULL
);
-- +goose Down
DROP TABLE IF EXISTS attachments_articles_mapping;