Use goose for migrations
This commit is contained in:
9
postgres/schema/0001_budgets.sql
Normal file
9
postgres/schema/0001_budgets.sql
Normal file
@ -0,0 +1,9 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE budgets (
|
||||
id char(26) NOT NULL,
|
||||
name text NOT NULL,
|
||||
last_modification timestamp with time zone
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE budgets;
|
8
postgres/schema/0002_user_budgets.sql
Normal file
8
postgres/schema/0002_user_budgets.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE user_budgets (
|
||||
user_id char(26) NOT NULL,
|
||||
budget_id char(26) NOT NULL
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE user_budgets;
|
10
postgres/schema/0003_users.sql
Normal file
10
postgres/schema/0003_users.sql
Normal file
@ -0,0 +1,10 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE users (
|
||||
id char(26) NOT NULL,
|
||||
email text NOT NULL,
|
||||
name text NOT NULL,
|
||||
password text NOT NULL
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE users;
|
Reference in New Issue
Block a user