Skip to content

Commit f84592b

Browse files
authored
add warning for for unknown tables getting deleted (#1682)
* add warning for for unknown tables getting deleted * fix punctuation * made suggested changes
1 parent 8dffbd5 commit f84592b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docusaurus/docs/dev-docs/database-migrations.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ Migrations are run using JavaScript migration files stored in `./database/migrat
1818
Strapi automatically detects migration files and run them once at the next startup in alphabetical order. Every new file is executed once. Migrations are run before the database tables are synced with the content-types schemas.
1919

2020
:::warning
21-
Currently Strapi does not support down migrations. This means that if you need to revert a migration, you will have to do it manually. It is planned to implement down migrations in the future but no timeline is currently available.
21+
* Currently Strapi does not support down migrations. This means that if you need to revert a migration, you will have to do it manually. It is planned to implement down migrations in the future but no timeline is currently available.
22+
23+
* Strapi will delete any unknown tables without warning. This means that database migrations can only be used to keep data when changing the Strapi schema. The `forceMigration` and `runMigrations` [database configuration parameters](/dev-docs/configurations/database#settings-configuration-object) can be used to fine-tune the database migrations behavior.
2224
:::
2325

2426
Migration files should export the function `up()`, which is used when upgrading (e.g. adding a new table `my_new_table`).

0 commit comments

Comments
 (0)