Fix new app templates
This commit is contained in:
parent
9b63f01905
commit
63afefa9e8
2
go.sum
2
go.sum
|
@ -55,6 +55,7 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
|
||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
||||
github.com/jackc/chunkreader/v2 v2.0.0 h1:DUwgMQuuPnS0rhMXenUtZpqZqrR/30NWY+qQvTpSvEs=
|
||||
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
||||
|
@ -71,6 +72,7 @@ github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye47
|
|||
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=
|
||||
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
|
||||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
|
||||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//
|
||||
// Note that this package won't prevent race conditions (e.g. when assigning to
|
||||
// a global templates variable). You'll need to use sync.RWMutex yourself.
|
||||
package serv // import "github.com/teamwork/reload"
|
||||
package serv
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
@ -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
|
|
@ -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(),
|
||||
full_name: fake.name(),
|
||||
email: fake.email(),
|
||||
password: pwd,
|
||||
password_confirmation: pwd
|
||||
}
|
||||
|
||||
var res = graphql(" \
|
||||
|
|
Loading…
Reference in New Issue