-- +goose Up
CREATE TABLE article
(
    id            BIGINT UNSIGNED  NOT NULL AUTO_INCREMENT PRIMARY KEY,
    url           VARCHAR(255)     NOT NULL UNIQUE,
    title         TEXT             NOT NULL,
    image         VARCHAR(255)     NOT NULL,
    text          TEXT             NOT NULL,
    preview_text  TEXT,
    meta_keywords TEXT,
    meta_desc     TEXT,
    publish_time  TIMESTAMP        NOT NULL,
    language      TINYINT UNSIGNED NOT NULL,
    is_active     BOOL             NOT NULL,
    CONSTRAINT `fk_language`
        FOREIGN KEY (language) REFERENCES language (id)
            ON DELETE RESTRICT
            ON UPDATE RESTRICT
);

-- +goose Down
DROP TABLE article;
