Fix new app templates

This commit is contained in:
Vikram Rangnekar
2019-09-29 01:16:34 -04:00
parent 9b63f01905
commit 63afefa9e8
4 changed files with 13 additions and 20 deletions

View File

@ -1,21 +1,16 @@
-- Write your migrate up statements here
CREATE DATABASE {{ .app_name_slug }}_{{ .env }}
-- 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 TABLE public.users (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
full_name text,
email text UNIQUE NOT NULL CHECK (length(email) < 255),
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
DROP DATABASE IF EXISTS {{ .app_name_slug }}_{{ .env }}
DROP TABLE public.users

View File

@ -3,13 +3,9 @@
var users = [];
for (i = 0; i < 10; i++) {
var pwd = fake.password()
var data = {
first_name: fake.first_name(),
last_name: fake.last_name(),
email: fake.email(),
password: pwd,
password_confirmation: pwd
full_name: fake.name(),
email: fake.email(),
}
var res = graphql(" \