From fb97b4eb785593c02b9d8d860193f7c28e141172 Mon Sep 17 00:00:00 2001 From: Mark Ferlatte Date: Tue, 18 Mar 2025 13:12:43 -0700 Subject: [PATCH] Ues template1 instead of template0 --- Makefile | 2 +- README.md | 2 +- pkg/manager/manager_config.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4e4701c..5eea0ed 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 754b8bd..ad2a4dd 100644 --- a/README.md +++ b/README.md @@ -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_` | `INTEGRESQL_TEMPLATE_DB_PREFIX` | | `"template"` | | Managed *test* databases: prefix `integresql_test__` | `INTEGRESQL_TEST_DB_PREFIX` | | `"test"` | diff --git a/pkg/manager/manager_config.go b/pkg/manager/manager_config.go index a37a13e..5fc7863 100644 --- a/pkg/manager/manager_config.go +++ b/pkg/manager/manager_config.go @@ -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"),