Skip to content

Commit

Permalink
Add useTypescriptMigrations (#2283)
Browse files Browse the repository at this point in the history
* Add useTypescriptMigrations

* Update docusaurus/docs/dev-docs/configurations/database.md

---------

Co-authored-by: Pierre Wizla <[email protected]>
  • Loading branch information
innerdvations and pwizla authored Nov 20, 2024
1 parent 8269e8f commit 687e98c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docusaurus/docs/dev-docs/configurations/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,15 @@ When using Docker, change the pool `min` value to `0` as Docker will kill any id

The `settings` object found in `./config/database.js` (or `./config/database.ts` for TypeScript) is used to configure Strapi-specific database settings and accepts the following parameters:

| Parameter | Description | Type | Default |
| ---------------- | --------------------------------------------------------------- | --------- | ------- |
| `forceMigration` | Enable or disable the forced database migration. | `Boolean` | `true` |
| `runMigrations` | Enable or disable database migrations from running on start up. | `Boolean` | `true` |
| Parameter | Description | Type | Default |
| ---------------- | --------------------------------------------------------------- | --------- | ------- |
| `forceMigration` | Enable or disable the forced database migration. | `Boolean` | `true` |
| `runMigrations` | Enable or disable database migrations from running on start up. | `Boolean` | `true` |
| `useTypescriptMigrations` | Look for migrations in the build dir instead of the src dir | `Boolean` | `false` |

:::note
When using `useTypescriptMigrations` you can continue to use existing JavaScript migrations by setting `compilerOptions { allowJs: true }` in your tsconfig file.
:::

<!-- TODO: Open and track a feature request for autoMigration as it doesn't exist in v4 -->

Expand Down

0 comments on commit 687e98c

Please sign in to comment.