Skip to content

flask: Safety against db deletion in prod2sqlite migration script (3/3 split of #73) - #76

Open
RudraBJoshi wants to merge 2 commits into
Open-Coding-Society:mainfrom
CSA-Admin-OCS:split/flask/f3-migration-script-safety
Open

flask: Safety against db deletion in prod2sqlite migration script (3/3 split of #73)#76
RudraBJoshi wants to merge 2 commits into
Open-Coding-Society:mainfrom
CSA-Admin-OCS:split/flask/f3-migration-script-safety

Conversation

@RudraBJoshi

Copy link
Copy Markdown

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.py calls db.drop_all() on whatever database the app is bound to, and __init__.py picks MySQL whenever the DB env vars are set — so a production .env sitting 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 a FORCE_YES flag for scripted runs.

Original PR: #73

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants