Skip to content

Fix down migration

Luke Duncalfe requested to merge 433984-migration_fix into master

What does this MR do and why?

This MR fixes a down migration #433984 (comment 1684951470).

How to set up and validate locally

On master:

  1. Run bundle exec rake db:migrate:down:main VERSION=20230222161954
  2. Open psql: gdk psql
  3. In psql, type: \d jira_tracker_data

You'll still see a constraint: "check_4cc5bbc801" CHECK (char_length(jira_issue_prefix) <= 255).

When we do the same steps on this branch, the constraint is gone:

  1. Check out this branch.
  2. Run migrations forward again: bundle exec rake db:migrate.
  3. Run bundle exec rake db:migrate:down:main VERSION=20230222161954
  4. Open psql: gdk psql
  5. In psql, type: \d jira_tracker_data

You won't see the constraint now.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #433984 (closed)

Merge request reports