Update to 0.99.34 - DB migration ERROR 23505 (unique_violation)
I have two instances of the app. The update went smoothly on one of them, but an error occurred on the other:
Mar 28 08:52:46 Running database migrations...
Mar 28 08:52:48 {"message":"== Running 20260323000001 Tymeslot.Repo.Migrations.AddProviderAccountFieldsAndReplaceUniqueness.up/0 forward","time":"2026-03-28T07:52:48.089Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"alter table video_integrations","time":"2026-03-28T07:52:48.105Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"alter table calendar_integrations","time":"2026-03-28T07:52:48.107Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"execute \"UPDATE video_integrations\\nSET provider_account_id = custom_meeting_url\\nWHERE provider = 'custom' AND custom_meeting_url IS NOT NULL\\n\"","time":"2026-03-28T07:52:48.111Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"execute \"UPDATE video_integrations\\nSET provider_account_id = base_url\\nWHERE provider = 'mirotalk' AND base_url IS NOT NULL\\n\"","time":"2026-03-28T07:52:48.113Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"drop index if exists one_active_integration_per_user_provider","time":"2026-03-28T07:52:48.114Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"create index unique_active_video_account_per_user","time":"2026-03-28T07:52:48.118Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"create index unique_active_calendar_account_per_user","time":"2026-03-28T07:52:48.122Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"create index unique_active_video_null_account_per_user","time":"2026-03-28T07:52:48.124Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 {"message":"create index unique_active_calendar_null_account_per_user","time":"2026-03-28T07:52:48.126Z","metadata":{"line":363,"file":"lib/ecto/migration/runner.ex","application":"ecto_sql"},"severity":"info"}
Mar 28 08:52:48 ** (Postgrex.Error) ERROR 23505 (unique_violation) could not create unique index "unique_active_calendar_null_account_per_user"
Mar 28 08:52:48 2026-03-28T08:52:48+01:00
Mar 28 08:52:48 table: calendar_integrations
Mar 28 08:52:48 constraint: unique_active_calendar_null_account_per_user
Mar 28 08:52:48 2026-03-28T08:52:48+01:00
Mar 28 08:52:48 Key (user_id, provider)=(1, caldav) is duplicated.
Mar 28 08:52:48 (ecto_sql 3.13.5) lib/ecto/adapters/sql.ex:1113: Ecto.Adapters.SQL.raise_sql_call_error/1
Mar 28 08:52:48 (elixir 1.19.5) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2
Mar 28 08:52:48 (ecto_sql 3.13.5) lib/ecto/adapters/sql.ex:1234: Ecto.Adapters.SQL.execute_ddl/4
Mar 28 08:52:48 (ecto_sql 3.13.5) lib/ecto/migration/runner.ex:348: Ecto.Migration.Runner.log_and_execute_ddl/3
Mar 28 08:52:48 (elixir 1.19.5) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2
Mar 28 08:52:48 (elixir 1.19.5) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2
Mar 28 08:52:57 => Healthcheck error: AbortError: The operation was aborted


