Skip to content

feat: add email_verified_field to identity_providers table in migration#51

Merged
chenyme merged 1 commit into
devfrom
migrate
May 26, 2026
Merged

feat: add email_verified_field to identity_providers table in migration#51
chenyme merged 1 commit into
devfrom
migrate

Conversation

@chenyme

@chenyme chenyme commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix identity provider save failures on existing databases by adding an idempotent PostgreSQL baseline migration for the newly added identity_providers.email_verified_field column.

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Configuration / deployment
  • Security hardening
  • Other

Affected areas

  • Frontend / UI
  • Backend / API
  • Authentication / authorization
  • Conversations / streaming
  • Files / RAG / extraction
  • Model routing / providers
  • MCP / tools
  • Billing / payments
  • Admin console
  • Deployment / Docker / configuration
  • Documentation

Verification

  • cd backend && go test ./internal/infra/persistence/postgres/...
  • cd backend && go test ./internal/application/auth ./internal/transport/http/auth
  • git diff --check
  • Not run; reason:

Screenshots, API examples, or logs

ERROR: column "email_verified_field" of relation "identity_providers" does not exist (SQLSTATE 42703)

Configuration, migration, and compatibility notes

Adds an idempotent startup migration:

ALTER TABLE "identity_providers"
ADD COLUMN IF NOT EXISTS "email_verified_field" varchar(64) NOT NULL DEFAULT 'email_verified'

Existing deployments will add the missing column on backend restart. No API contract changes. No manual migration is required.

Documentation

  • Documentation is not needed for this change.
  • Documentation was updated.
  • Documentation still needs to be updated.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed, including authentication, authorization, provider routing, file processing, billing, and admin APIs where relevant.

Checklist

  • I searched existing issues and pull requests.
  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme
chenyme merged commit 9d270fb into dev May 26, 2026
2 checks passed
@chenyme
chenyme deleted the migrate branch May 26, 2026 01:53
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.

[Bug]: 新增身份源失败,数据库缺少 identity_providers.email_verified_field 字段

1 participant