-- +goose Up
CREATE TABLE article_tag
(
    article_id BIGINT UNSIGNED NOT NULL,
    tag_id     INT UNSIGNED NOT NULL,
    UNIQUE (article_id, tag_id),
    CONSTRAINT `fk_article`
        FOREIGN KEY (article_id) REFERENCES article (id)
            ON DELETE RESTRICT
            ON UPDATE RESTRICT,
    CONSTRAINT `fk_tag`
        FOREIGN KEY (tag_id) REFERENCES tag (id)
            ON DELETE RESTRICT
            ON UPDATE RESTRICT
);

-- +goose Down
DROP TABLE article_tag;
