impress/db/openneo_id_migrate/README.md

36 lines
1.9 KiB
Markdown
Raw Normal View History

# Legacy openneo_id Database Migrations
These migrations are kept for historical reference only. They were applied to the separate `openneo_id` database before it was consolidated into the main `openneo_impress` database in November 2025.
## What happened?
Originally, Dress to Impress used two separate MySQL databases:
- `openneo_impress` - Main application data (items, outfits, closets, etc.)
- `openneo_id` - Authentication data (user accounts, passwords, OAuth)
This split was a legacy from when "OpenNeo ID" was envisioned as a separate authentication service that would unify login across multiple OpenNeo projects. Since DTI was the only successful project, we consolidated the databases.
## Migration details
On **November 2, 2025**, the `openneo_id.users` table was copied to `openneo_impress.auth_users`, preserving all data and IDs. The `openneo_id` database was then removed from production.
See the main migrations directory for:
- `20251102064247_copy_auth_users_table_to_main_database.rb` - The migration that copied the data
## Can these migrations be run?
**No.** These migrations reference the `openneo_id` database which no longer exists. They are preserved purely as documentation of how the authentication schema evolved over time.
## Migration history
1. `20230807005748_add_remember_created_at_to_users.rb` - Added Devise rememberable feature
2. `20240313200849_add_omniauth_fields_to_users.rb` - Added NeoPass OAuth support
3. `20240315020053_allow_null_email_and_password_for_users.rb` - Made email/password optional for OAuth users
4. `20240401124406_increase_username_length.rb` - Increased username limit from 20 to 30 chars
5. `20240407135246_add_neo_pass_email_to_users.rb` - Added neopass_email field
6. `20240408120359_add_unique_index_for_omniauth_to_users.rb` - Added unique constraint for provider+uid
---
For current authentication schema, see `db/schema.rb` and look for the `auth_users` table.