impress/app
Emi Matchu 604a8667cf feat: add write lock for AuthUser migration preparation
This commit implements a temporary write lock on the AuthUser model to
prepare for consolidating the openneo_id database into the main database.

Changes:
- AuthUser: Added before_save/before_destroy callbacks that raise
  TemporarilyReadOnly exception to prevent any writes
- AuthUser: Override update_tracked_fields! to silently skip Devise login
  tracking (prevents crashes during login while maintaining read access)
- ApplicationController: Added rescue_from handler for TemporarilyReadOnly
  that redirects to root with a friendly maintenance message
- Migration: Created CopyAuthUsersTableToMainDatabase to copy
  openneo_id.users → openneo_impress.auth_users (preserves all IDs)

This allows us to run the data copy migration in production while:
- Keeping existing users able to log in and use the site
- Blocking new registrations, settings changes, and NeoPass connections
- Losing some login tracking data (acceptable tradeoff)

Next step: Deploy this, then run the migration in production while the
table is stable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 06:50:55 +00:00
..
assets Migrate from Owls NC values to Lebron 2025-06-27 15:26:38 -07:00
controllers feat: add write lock for AuthUser migration preparation 2025-11-02 06:50:55 +00:00
helpers Use improved NC trade value text in item page 2025-06-27 15:30:36 -07:00
javascript Remove Sentry from wardrobe JS 2025-04-27 12:02:20 -07:00
mailers/fundraising Move most fundraising files into a Fundraising module 2024-02-18 20:12:14 -08:00
models feat: add write lock for AuthUser migration preparation 2025-11-02 06:50:55 +00:00
services Update NC Mall scraping for new redesign 2025-10-30 12:43:14 +00:00
views Add support summary UI to alt styles page 2025-11-02 06:12:36 +00:00