0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/migrations/tooling/lib
Gerhard Schlager 810a0849b8 MT: Support ignoring all other tables in schema configs
Some databases only mirror a handful of live tables by design. files_db,
for example, just needs uploads and optimized_images because that's all
disco's upload writer touches. With the current DSL the only way to keep
`schema diff` quiet is to list every remaining core table in ignored.rb,
which would be hundreds of entries that go stale on every core change.

This adds an `all_other_tables <reason>` declaration to the ignored DSL.
When it's set, the Differ treats every live table that isn't configured
or explicitly ignored as ignored, so there's no unconfigured-table noise.
Explicit `table`/`tables`/`plugin` entries still work alongside it and
keep their per-table reasons and stale-ignore checks. The reason is
mandatory and it can only be declared once.

I added ignored.rb for files_db using the new declaration.
2026-07-10 21:24:17 +02:00
..
migrations MT: Support ignoring all other tables in schema configs 2026-07-10 21:24:17 +02:00
migrations-tooling.rb