Project

General

Profile

Refactor #33909

Clean up old data migrations from Foreman < 2.0

Added by Tomer Brisker about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Many old data migrations can be cleaned up, specifically migrations that were used to modify data structures during upgrades.
These migration are not needed on new installs, and any upgrades will have executed them by now.
We do not support upgrading multiple versions at once, and considering Foreman 3.1 will soon be released it should be safe to clean up any such migrations from before 2.0.

Associated revisions

Revision 98514209 (diff)
Added by Tomer Brisker about 1 year ago

Fixes #33909 - Drop data migrations before Foreman 2.0

All data migrations only modify data on upgrades. On new installs they
are not required. Since we do not generally support upgrading multiple
releases, we can clean up old data migrations. This commit cleans up all
the data migrations that were present before Foreman 2.0.

Revision 05d7ec8c (diff)
Added by Tomer Brisker about 1 year ago

Refs #33909 - Delete empty migrations

New installs will not run these empty migrations, and old installs will
only list that they have been executed when checking the `rake
db:migrate:status` with no file, which is harmless.

Revision 490efe47 (diff)
Added by Tomer Brisker about 1 year ago

Refs #33909 - Remove useless User lookup

There is no need to lookup the admin user and use it to update the
http proxy fields.

Revision 46782f7f (diff)
Added by Tomer Brisker about 1 year ago

Refs #33909 - Squash imap column conversion

Revision 4d294c5e (diff)
Added by Tomer Brisker about 1 year ago

Refs #33909 - Reset User column information

While migrations shouldn't rely on any users existing in the DB, there
are some that currently do. If they try to use User.find_by_lower_login
they will currently error out since the method won't be defined yet.

Revision 4b440ef6 (diff)
Added by Tomer Brisker about 1 year ago

Refs #33909 - Drop test for deduplicate_subnets module

History

#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8920 added

#2 Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases 3.2.0 added

#3 Updated by Tomer Brisker about 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF