An open API service indexing awesome lists of open source software.

https://github.com/moi-solutions/db-fork

Script to automate the creation of a database based on a template in Postgres
https://github.com/moi-solutions/db-fork

bash postgres

Last synced: about 2 months ago
JSON representation

Script to automate the creation of a database based on a template in Postgres

Awesome Lists containing this project

README

          

# db-fork
Script to automate the creation of a database based on a template in Postgres.

> Only works if postgres does not have a password.

## Environment variables

POSTGRES_BIN_PATH // /Applications/Postgres.app/Contents/Versions/9.6/bin/
POSTGRES_BIN_NAME // createdb
POSTGRES_DATABASE_TEMPLATE_NAME // development
POSTGRES_DATABASE_HOST // localhost
POSTGRES_DATABASE_USERNAME // postgres

## Remote call (using default variable)

$ wget -qO- https://raw.githubusercontent.com/moi-solutions/db-fork/1.1/createdb.sh | bash

## Hook (Optional)

This hook call before command on **git checkout**.

> Call this command on root path from local repository.

cd .git/hooks/ && wget -O post-checkout https://git.io/v7s7X && chmod +x post-checkout && cd ../../