Skip to content

Use template1 instead of template0 as the default database template. #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ reset: ##- Wizard to drop and create our development database.
@echo " PGHOST=${PGHOST} PGDATABASE=${PGDATABASE}" PGUSER=${PGUSER}
@echo -n "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ]
psql -d postgres -c 'DROP DATABASE IF EXISTS "${PGDATABASE}";'
psql -d postgres -c 'CREATE DATABASE "${PGDATABASE}" WITH OWNER ${PGUSER} TEMPLATE "template0"'
psql -d postgres -c 'CREATE DATABASE "${PGDATABASE}" WITH OWNER ${PGUSER} TEMPLATE "template1"'

### -----------------------
# --- Binary checks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ IntegreSQL requires little configuration, all of which has to be provided via en
| PostgreSQL: username | `INTEGRESQL_PGUSER`, `PGUSER`, `USER` | Yes | `"postgres"` |
| PostgreSQL: password | `INTEGRESQL_PGPASSWORD`, `PGPASSWORD` | Yes | `""` |
| PostgreSQL: database for manager | `INTEGRESQL_PGDATABASE` | | `"postgres"` |
| PostgreSQL: template database to use | `INTEGRESQL_ROOT_TEMPLATE` | | `"template0"` |
| PostgreSQL: template database to use | `INTEGRESQL_ROOT_TEMPLATE` | | `"template1"` |
| Managed databases: prefix | `INTEGRESQL_DB_PREFIX` | | `"integresql"` |
| Managed *template* databases: prefix `integresql_template_<HASH>` | `INTEGRESQL_TEMPLATE_DB_PREFIX` | | `"template"` |
| Managed *test* databases: prefix `integresql_test_<HASH>_<ID>` | `INTEGRESQL_TEST_DB_PREFIX` | | `"test"` |
Expand Down
2 changes: 1 addition & 1 deletion pkg/manager/manager_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func DefaultManagerConfigFromEnv() ManagerConfig {
Database: util.GetEnv("INTEGRESQL_PGDATABASE", "postgres"),
},

TemplateDatabaseTemplate: util.GetEnv("INTEGRESQL_ROOT_TEMPLATE", "template0"),
TemplateDatabaseTemplate: util.GetEnv("INTEGRESQL_ROOT_TEMPLATE", "template1"),

DatabasePrefix: util.GetEnv("INTEGRESQL_DB_PREFIX", "integresql"),

Expand Down