Make add_column_with_default not fail if column already exists

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Migrations calling add_column_with_default have to disable transactions, but it's possible for migrations to fail and leave the database in a state where the column exists but not all the default values are set properly.

To recover, admins have to either delete the column or re-run the migration in some way that handles this error gracefully.

Is there a reason we shouldn't just default to warning warn the user that the column already exists?

/cc: @_stark, @yorickpeterse

ZD: https://gitlab.zendesk.com/agent/tickets/82392

Edited Sep 13, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading