Added websock upgrade option for base proxy host locations
This commit is contained in:
26
bin/migrate_create
Executable file
26
bin/migrate_create
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "Error: migrate name must be specified as first arg"
|
||||
exit 1
|
||||
else
|
||||
# Code path
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if hash realpath 2>/dev/null; then
|
||||
export CODEBASE=$(realpath $SCRIPT_DIR/..)
|
||||
elif hash grealpath 2>/dev/null; then
|
||||
export CODEBASE=$(grealpath $SCRIPT_DIR/..)
|
||||
else
|
||||
export CODEBASE=$(readlink -e $SCRIPT_DIR/..)
|
||||
fi
|
||||
|
||||
if [ -z "$CODEBASE" ]; then
|
||||
echo "Unable to determine absolute codebase directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$CODEBASE"
|
||||
|
||||
sudo /usr/local/bin/docker-compose run --rm --no-deps app node node_modules/knex/bin/cli.js migrate:make "$1"
|
||||
exit $?
|
||||
fi
|
Reference in New Issue
Block a user