15 lines
326 B
SQL
15 lines
326 B
SQL
-- +goose Up
|
|
CREATE TABLE posts (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
created_at DATE NOT NULL,
|
|
updated_at DATE NOT NULL,
|
|
title TEXT NOT NULL,
|
|
description TEXT,
|
|
published_at DATE NOT NULL,
|
|
url TEXT NOT NULL UNIQUE,
|
|
feed_id INTEGER NOT NULL REFERENCES feeds(id) ON DELETE CASCADE
|
|
);
|
|
|
|
-- +goose Down
|
|
DROP TABLE posts;
|