fixed initial db schema
This commit is contained in:
parent
fda7152c77
commit
79c556eb1d
|
@ -2,11 +2,11 @@
|
|||
-- +goose Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
|
||||
CREATE TABLE tags(tag_id SERIAL PRIMARY KEY, name varchar(255), parent_id INTEGER DEFAULT NULL, PRIMARY KEY(tag_id));
|
||||
CREATE TABLE tags(tag_id SERIAL PRIMARY KEY, name varchar(255), parent_id INTEGER DEFAULT NULL);
|
||||
|
||||
CREATE TABLE news(news_id INTEGER NOT NULL, url varchar(255), title varchar(255), tag_id integer REFERENCES tags, timestamp timestamp, description text, PRIMARY KEY(timestamp));
|
||||
CREATE TABLE news(news_id INTEGER NOT NULL, url varchar(255), title varchar(255), tag_id integer REFERENCES tags, timestamp timestamp PRIMARY KEY, description text);
|
||||
|
||||
CREATE TABLE users(username VARCHAR(128), password VARCHAR(128), PRIMARY KEY(username));
|
||||
CREATE TABLE users(username VARCHAR(128) PRIMARY KEY, password VARCHAR(128));
|
||||
|
||||
-- +goose Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
|
|
Loading…
Reference in New Issue