Merge pull request #46 from 8thlight/update-migration-script
Update migration script
This commit is contained in:
commit
5a2d05b8d0
@ -16,14 +16,20 @@ before_install:
|
|||||||
- make installtools
|
- make installtools
|
||||||
- bash ./scripts/install-postgres-10.sh
|
- bash ./scripts/install-postgres-10.sh
|
||||||
- npm install -g ganache-cli
|
- npm install -g ganache-cli
|
||||||
|
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||||
|
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||||
|
- sudo apt-get update && sudo apt-get install yarn
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- go get -u github.com/pressly/sup/cmd/sup
|
- go get -u github.com/pressly/sup/cmd/sup
|
||||||
- sudo -u postgres createdb vulcanize_private
|
- sudo -u postgres createdb vulcanize_private
|
||||||
- make migrate NAME=vulcanize_private
|
- make migrate NAME=vulcanize_private
|
||||||
- bash ./pkg/transformers/start_test_chain.sh
|
- bash ./pkg/transformers/start_test_chain.sh
|
||||||
|
- cd postgraphile && yarn
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- yarn test
|
||||||
|
- cd ../
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
|
@ -27,6 +27,7 @@ describe('bootServer', () => {
|
|||||||
middleware: jasmine.createSpyObj<PostgraphileMiddleware>(['call']),
|
middleware: jasmine.createSpyObj<PostgraphileMiddleware>(['call']),
|
||||||
options: {
|
options: {
|
||||||
pluginHook: jasmine.createSpy('pluginHook'),
|
pluginHook: jasmine.createSpy('pluginHook'),
|
||||||
|
watchPg: true,
|
||||||
simpleSubscriptions: true,
|
simpleSubscriptions: true,
|
||||||
graphiql: true,
|
graphiql: true,
|
||||||
webSocketMiddlewares: [] },
|
webSocketMiddlewares: [] },
|
||||||
|
@ -11,6 +11,7 @@ export interface PostgraphileMiddleware extends RequestHandler {}
|
|||||||
export interface PostgraphileOptions {
|
export interface PostgraphileOptions {
|
||||||
pluginHook: PluginHookFn,
|
pluginHook: PluginHookFn,
|
||||||
simpleSubscriptions: boolean;
|
simpleSubscriptions: boolean;
|
||||||
|
watchPg: boolean;
|
||||||
graphiql: boolean;
|
graphiql: boolean;
|
||||||
// NOTE (jchristie@8thlight.com) Shape of the middlewares is not
|
// NOTE (jchristie@8thlight.com) Shape of the middlewares is not
|
||||||
// currently important to this application, but if a need arises,
|
// currently important to this application, but if a need arises,
|
||||||
|
@ -27,6 +27,7 @@ export function buildServerConfig(
|
|||||||
const options: PostgraphileOptions = {
|
const options: PostgraphileOptions = {
|
||||||
pluginHook: pluginHook,
|
pluginHook: pluginHook,
|
||||||
simpleSubscriptions: true,
|
simpleSubscriptions: true,
|
||||||
|
watchPg: true,
|
||||||
graphiql: true,
|
graphiql: true,
|
||||||
webSocketMiddlewares: [
|
webSocketMiddlewares: [
|
||||||
expressSessionHandler,
|
expressSessionHandler,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if [ $# -eq 1 ]
|
if [ $# -eq 1 ]
|
||||||
then
|
then
|
||||||
$GOBIN/migrate create -dir ./db/migrations -ext sql $1
|
$GOPATH/bin/migrate create -dir ./db/migrations -ext sql $1
|
||||||
else
|
else
|
||||||
echo "**An Error Occurred**"
|
echo "**An Error Occurred**"
|
||||||
echo "Usage: ./scripts/create_migration <migration-name>"
|
echo "Usage: ./scripts/create_migration <migration-name>"
|
||||||
|
Loading…
Reference in New Issue
Block a user