diff --git a/src/lib/create-config.ts b/src/lib/create-config.ts index 5e2951c48dd3..e3c386d3d01c 100644 --- a/src/lib/create-config.ts +++ b/src/lib/create-config.ts @@ -259,7 +259,10 @@ const defaultDbOptions: WithOptional = propagateCreateError: false, }, schema: process.env.DATABASE_SCHEMA || 'public', - disableMigration: false, + disableMigration: parseEnvVarBoolean( + process.env.DATABASE_DISABLE_MIGRATION, + false, + ), applicationName: process.env.DATABASE_APPLICATION_NAME || 'unleash', }; diff --git a/website/docs/using-unleash/deploy/configuring-unleash.mdx b/website/docs/using-unleash/deploy/configuring-unleash.mdx index b087d05329aa..aff97d0a6227 100644 --- a/website/docs/using-unleash/deploy/configuring-unleash.mdx +++ b/website/docs/using-unleash/deploy/configuring-unleash.mdx @@ -383,6 +383,7 @@ Unleash options' `db` object. | `pool.idleTimeoutMillis` | `DATABASE_POOL_IDLE_TIMEOUT_MS` | 30000 | The amount of time (in milliseconds) that a connection must be idle for before it is marked as a candidate for eviction. | | `applicationName` | `DATABASE_APPLICATION_NAME` | `unleash` | The name of the application that created this Client instance. | | `schema` | `DATABASE_SCHEMA` | `public` | The schema to use in the database. | +| `disableMigration` | `DATABASE_DISABLE_MIGRATION` | false | The option not to use database migration. | Alternatively, you can use a single-host [libpq connection string](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) to