Skip to content

Conversation

imor
Copy link
Contributor

@imor imor commented Jan 8, 2024

A recent change in the auth.identities table made the following changes:

  1. The id column was renamed to provider_id.
  2. A new id column which should be a random uuid.

This change broke our "fix_auth_schema_values" migration. To fix it we updated the insert statement to include email as the provider_id value and a random uuid as the id. Since for email provider the provider_id should be email id in lowercase we added a new migration "update_provider_id" to update the provider_id column to the email column value.

Updating an existing migration is bad practice but I don't think we have any other option now.

A recent change in the auth.identities table made the following changes:

1. The id column was renamed to provider_id.
2. A new id column which should be a random uuid.

This change broke our "fix_auth_schema_values" migration. To fix it we updated the insert statement to include email as the provider id value and a random uuid as the id. Since for email provider the provider_id should be email id in lowercase we added a new migration "update_provider_id" to update the provider_id column to the email column value.

Updating an older migration is bad practice but I don't think we have any other option now.
Copy link

vercel bot commented Jan 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dbdev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2024 9:26am

@imor imor merged commit 0688d9a into master Jan 8, 2024
@imor imor deleted the fix_migration branch January 8, 2024 17:05
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