impress/db/openneo_id_migrate/README.md
Emi Matchu 9ba94f9f4b chore: document legacy openneo_id migrations and update references
This commit completes the database consolidation cleanup by documenting
the historical migrations and updating all references to reflect the
single-database architecture.

Changes:
- db/openneo_id_migrate/README.md: Created comprehensive documentation
  explaining the history of the separate database and why these migrations
  are preserved but no longer runnable
- db/openneo_id_schema.rb: Deleted (no longer needed)
- README.md: Updated to reflect single-database architecture
  - Removed mentions of "two databases"
  - Updated "OpenNeo ID Database" section to "Authentication Architecture"
  - Added reference to historical context in db/openneo_id_migrate/README.md
- deploy/setup.yml: Removed openneo_id database creation and privileges
  for future deployments
- db/migrate/20240401124200_increase_username_length.rb: Updated comment
  to note this was historically paired with an openneo_id migration

The codebase now fully reflects the consolidated single-database architecture.
The legacy migration files in db/openneo_id_migrate/ are preserved for
historical reference only.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 07:02:43 +00:00

1.9 KiB

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.