Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultExtensions = []string{"uuid-ossp", "pgcrypto"}
DefaultExtensions are always installed regardless of POSTGRES_EXTENSIONS config.
Functions ¶
func EnsureNpPluginsTable ¶ added in v1.0.13
func EnsureNpPluginsTable() string
EnsureNpPluginsTable returns the SQL statement that idempotently creates the np_plugins table. Callers (e.g. the live DB bootstrap path) can execute this directly against a running Postgres container when the postgres/init/ dir is not available (e.g. in upgrade scenarios).
The statement uses CREATE TABLE IF NOT EXISTS so it is always safe to execute more than once.
func GenerateInitScript ¶
GenerateInitScript creates the basic Postgres initialization SQL script containing the structural schemas required by Nhost containers, and also writes the np_plugins bootstrap script so that the table is created idempotently on every stack start.
func InstallExtensions ¶
InstallExtensions runs CREATE EXTENSION IF NOT EXISTS for DefaultExtensions plus any extras provided. Called from nself start Phase 2 (DB init). Safe to call multiple times — IF NOT EXISTS is idempotent.
Types ¶
This section is empty.