flask: Safety against db deletion in prod2sqlite migration script (3/3 split of #73) - #76
Open
RudraBJoshi wants to merge 2 commits into
Conversation
Ensures any Claude Code session working in this repo automatically sees that .clauderc (one directory up, at the prodsys root) has the project structure, ongoing work, deploy requirements, and known gaps -- CLAUDE.md is auto-loaded into context at session start, .clauderc on its own is not.
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.
Splitting #73 into smaller, independently-reviewable PRs across spring/flask/pages. This one is the migration script safety fix — unrelated to the password reset feature itself, just bundled into the original PR.
scripts/db_migrate-prod2sqlite.pycallsdb.drop_all()on whatever database the app is bound to, and__init__.pypicks MySQL whenever the DB env vars are set — so a production.envsitting in the working directory turned "pull prod down into sqlite" into "wipe prod". Adds a check that refuses to run unless the target is a local SQLite file, verified timestamped backups before any drop, and aFORCE_YESflag for scripted runs.Original PR: #73