Skip to content

Commit

Permalink
Bugfix in migration example. Was not running. (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdombro authored and goldcaddy77 committed Apr 17, 2019
1 parent 53bcf67 commit 7bb3039
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/5-migrations/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_HOST=localhost
APP_PORT=4100
TYPEORM_CONNECTION=postgres
TYPEORM_DATABASE=example5
TYPEORM_USERNAME=postgres
TYPEORM_PASSWORD=
TYPEORM_SYNCHRONIZE=true
2 changes: 1 addition & 1 deletion examples/5-migrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bootstrap": "cd ../.. && yarn && cd - && yarn && yarn db:create && yarn generate:code",
"db:create": "createdbjs $(dotenv -p TYPEORM_DATABASE) 2>&1 || :",
"db:drop": "dropdbjs $(dotenv -p TYPEORM_DATABASE) 2>&1 || :",
"generate:code": "dotenv -- ts-node tools/generate.ts && rm *.sqlite.tmp",
"generate:code": "dotenv -- ts-node tools/generate.ts",
"playground:open": "open http://localhost:$(dotenv -p APP_PORT)/graphql",
"start": "yarn start:ts",
"start:ts": "DEBUG=warthog* ts-node-dev --type-check src/index.ts",
Expand Down
1 change: 1 addition & 0 deletions examples/5-migrations/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Server } from '../../../src/';
export function getServer(AppOptions = {}) {
return new Server(
{
introspection: true,
warthogImportPath: '../../../src',
...AppOptions
},
Expand Down
2 changes: 1 addition & 1 deletion examples/5-migrations/tools/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getServer } from '../src/server';
const logger = Debug('warthog:generate');

async function generate() {
return getServer({ mockDBConnection: true }).generateFiles();
return getServer({}).generateFiles();
}

generate()
Expand Down

0 comments on commit 7bb3039

Please sign in to comment.