2019-09-27 08:19:24 +02:00
|
|
|
-- Write your migrate up statements here
|
|
|
|
|
2019-09-28 17:34:03 +02:00
|
|
|
CREATE DATABASE {{ .app_name_slug }}_{{ .env }}
|
2019-09-27 08:19:24 +02:00
|
|
|
|
|
|
|
-- CREATE TABLE public.users (
|
|
|
|
-- id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
|
|
|
-- full_name text
|
|
|
|
-- email text UNIQUE NOT NULL CHECK (length(email) < 255),
|
|
|
|
-- encrypted_password text,
|
|
|
|
-- created_at timestamptz NOT NULL NOT NULL DEFAULT NOW(),
|
|
|
|
-- updated_at timestamptz NOT NULL NOT NULL DEFAULT NOW()
|
|
|
|
-- );
|
|
|
|
|
|
|
|
---- create above / drop below ----
|
|
|
|
|
|
|
|
-- Write your migrate down statements here. If this migration is irreversible
|
|
|
|
-- Then delete the separator line above.
|
|
|
|
|
|
|
|
-- DROP TABLE public.users
|
|
|
|
|
2019-09-28 17:34:03 +02:00
|
|
|
DROP DATABASE IF EXISTS {{ .app_name_slug }}_{{ .env }}
|