KSAUTH_URL= # url to the auth cloud function
KSAPI_URL= # url to the api cloud function
DATABASE_URL= # postgres url for migrations
- Google CLoud CLI: Recommended Install
- Cloud SQL Proxy: Intall it from here
- Golang Migrate:
brew install golang-migrate
cloud_sql_proxy \
-dir /tmp/cloudsql \
-instances=wearedevx:europe-west6:devx=tcp:5432 \
-credential_file=functions/ksapi/wearedevx-aa84b56c44de.json
Note : You need a valid gcloud credentials file
For the api function
cd functions/ksapi/cmd
go run main.go
For the auth function
cd fucntions/ksapi/cmd
go run main.go
./run.sh [options] [command]
./build.sh
The release binary is ks
./gen.migration.sh create_an_example_table
Creates:
db/migrations/xxxxxx_create_an_example_table.down.shdb/migrations/xxxxxx_create_an_example_table.up.sh
Upward:
./migrate.sh up
Backward:
./migrate.sh down
Specific version:
./migrate.sh force $VERSION