-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AO3-6639 Output current DB schema #4669
Conversation
(This isn't quite tests, but that's the closest label.) |
Things I noticed: Based on https://github.com/otwcode/otwarchive/wiki/Migrations#why-not-dumping-from-development-environments it may be better to run this in production, not in a local docker setup. |
This reverts commit 6e4a835.
I pulled the schema from a prod DB and it's almost the same as the one from Docker (compare the last 2 commits to see the few differences). In terms of updating the schema on migrate with Docker, I think it's a tradeoff between 100% exact match against prod and staying more up-to-date. Since we never recreated the prod database from |
Agreed to the reasoning for keeping the Docker schema, good to see that there are no major differences. Regarding the config, the docs suggest setting dump_schema_after_migration to false in production (and likely also staging). |
(I've added the SQL dump too per conversation with @Bilka2 elsewhere; I'd recommend skimming it at most since the diff is a bit larger.) |
I looked over the SQL dump and it looks consistent with the rb dump and good in general 👍 |
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing
)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-6639
Purpose
schema.rb
when a new migration runs; this will make it so PRs with migrations update by default, saving us work later (we update the structure SQL separately, and that will stay manual as MySQL formats may change to not match real prod)Credit
Brian Austin (they/he)