2015-04-27 05:37:00 +00:00
|
|
|
|
|
|
|
-- +goose Up
|
|
|
|
-- SQL in section 'Up' is executed when this migration is applied
|
|
|
|
|
2015-04-27 14:23:02 +00:00
|
|
|
CREATE TABLE tags(tag_id SERIAL PRIMARY KEY, name varchar(255), parent_id INTEGER DEFAULT NULL);
|
2015-04-27 05:37:00 +00:00
|
|
|
|
2015-05-10 21:55:21 +00:00
|
|
|
CREATE TABLE news(news_id SERIAL, url varchar(255), title varchar(255), tag_id integer REFERENCES tags, timestamp timestamp PRIMARY KEY, description text);
|
2015-04-27 05:37:00 +00:00
|
|
|
|
2015-04-27 14:23:02 +00:00
|
|
|
CREATE TABLE users(username VARCHAR(128) PRIMARY KEY, password VARCHAR(128));
|
2015-04-27 05:37:00 +00:00
|
|
|
|
|
|
|
-- +goose Down
|
|
|
|
-- SQL section 'Down' is executed when this migration is rolled back
|
|
|
|
|
|
|
|
DROP TABLE tags;
|
|
|
|
DROP TABLE news;
|
|
|
|
DROP TABLE users;
|