mirror of https://github.com/pressly/goose.git
15 lines
332 B
SQL
15 lines
332 B
SQL
-- +goose Up
|
|
-- +goose StatementBegin
|
|
CREATE TABLE posts (
|
|
id INTEGER PRIMARY KEY,
|
|
title TEXT NOT NULL,
|
|
content TEXT NOT NULL,
|
|
author_id INTEGER NOT NULL,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
FOREIGN KEY (author_id) REFERENCES users(id)
|
|
);
|
|
-- +goose StatementEnd
|
|
|
|
-- +goose Down
|
|
DROP TABLE posts;
|