impress/app/models
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
..
fundraising Move fundraising models into the Fundraising module 2024-02-18 20:29:31 -08:00
item Migrate from Owls NC values to Lebron 2025-06-27 15:26:38 -07:00
pet Add logging for alt style changes 2025-11-02 04:18:33 +00:00
alt_style.rb Fix NC style series sort order in search dropdown 2025-06-22 12:37:28 -07:00
application_record.rb Add configurable full name field to alt styles 2025-02-15 21:52:47 -08:00
auth_record.rb Add AuthUser model, connecting to openneo_id db 2023-10-23 19:05:07 -07:00
auth_user.rb feat: add write lock for AuthUser migration preparation 2025-11-02 06:50:55 +00:00
closet_hanger.rb Hide shadowbanned users from trade lists for most viewers 2025-06-22 11:35:27 -07:00
closet_list.rb Disallow email addresses in closet list descriptions 2024-04-16 17:04:31 -07:00
closet_visibility.rb Delete a couple unused accessors 2023-11-11 15:42:08 -08:00
color.rb Handle new colors/species in the Rainbow Pool 2024-11-15 19:56:07 -08:00
contribution.rb Track contributions of Alt Styles 2024-01-24 03:54:43 -08:00
item.rb Add high-level documentation 2025-10-30 07:31:36 +11:00
item_outfit_relationship.rb Oops, update outfit's updated_at when adding/removing items 2024-02-08 10:32:53 -08:00
nc_mall_record.rb Add more info to NC Mall section of Item Getting Guide 2024-05-14 16:04:40 -07:00
neopets_connection.rb Disallow email addresses in Neopets usernames 2025-06-22 11:16:26 -07:00
neopets_page.rb Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
outfit.rb Add high-level documentation 2025-10-30 07:31:36 +11:00
parent_swf_asset_relationship.rb Revert modeling refactors to the old modeling that worked! 2024-11-06 14:31:16 -08:00
pet.rb Reapply "Extract modeling ViewerData class into new Pet::ModelingSnapshot file" 2024-11-10 11:43:54 -08:00
pet_state.rb Update pet state bulk-labeling to skip to next unlabeled if desired 2024-12-08 10:08:39 -08:00
pet_type.rb Update pet state bulk-labeling to skip to next unlabeled if desired 2024-12-08 10:08:39 -08:00
species.rb Handle new colors/species in the Rainbow Pool 2024-11-15 19:56:07 -08:00
swf_asset.rb Use new DTIRequests.load_many helper in SwfAsset.preload_manifests 2024-12-16 13:19:58 -08:00
user.rb Hide shadowbanned users from trade lists for most viewers 2025-06-22 11:35:27 -07:00
zone.rb Remove unused logic for whether a zone is "sometimes" occupied 2024-08-31 13:16:47 -07:00