Fix incorrect claim that Strapi deletes unknown database tables - #3421
Merged
Conversation
The schema sync only drops tables and columns that Strapi previously managed; tables created outside of Strapi are explicitly left untouched. Also documents the startup sequence, since the destructive step was buried in a warning callout.
forceMigration controls destructive schema operations rather than migrations, which the previous one-line description did not convey. useTypescriptMigrations was referenced from the migrations page but missing from this table.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ages The migrations page presented forceMigration: false as a dry-run to inspect what would be dropped, but the schema sync persists the new schema regardless, so a skipped object stops being tracked. It also credited runMigrations with fine-tuning the schema sync, which it does not affect. Aligns the drop scope on tables, columns, indexes, and foreign keys, and uses schema sync rather than schema migrations.
Each numbered step now describes one action, per the technical writing rules, and bold is reserved for UI elements. Also downgrades an informational callout from caution to note.
… pages The TypeScript configuration example opened with 'export default =', which is a syntax error, and both generated-configuration blocks used the MySQL port 3306 in their postgres branch instead of 5432. The migration example also used the deprecated Entity Service instead of the Document Service.
The sample output was missing the prefix that the logger always emits, and the section implied the heartbeats were available to user migration files. The logger is not exported from the database package and is only used by Strapi's internal migrations, so the section now explains how to read the log line instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR corrects the database migrations page, which stated that Strapi deletes any unknown table without warning. The schema sync only drops the tables, columns, indexes, and foreign keys that Strapi previously managed, and tables created outside of Strapi are explicitly left untouched. It also adds a step-by-step startup sequence, since the destructive step was previously buried in a warning callout, and clarifies forceMigration (which controls destructive schema operations rather than migrations), runMigrations, and useTypescriptMigrations, which was referenced from the migrations page but missing from the settings table.
It also fixes a few pre-existing problems found on both pages while reviewing the change:
falseas a dry-run to inspect what would be dropped. The schema sync records the new schema as the reference regardless, so a skipped object simply stops being tracked.export default = ({ env }) =>.Comes from docs feedback CMS-260730060248, where a user reported having to read the source code to understand what the migration process actually does to their tables.
Direct preview link 👉 here