Bug #13221

Avoid schema differences between a default install and an upgraded database

Added by José Raddaoui Marín 3 months ago. Updated about 1 month ago.

Status:QA/ReviewStart date:12/05/2019
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:Data model / ORM
Target version:Release 2.6.0
Google Code Legacy ID: Tested version:2.5
Sponsored:No Requires documentation:

Description

The following differences have been found between an upgraded and a default install database:

Important:
  • Culture columns are missing the NOT NULL constraint (introduced here).
  • Slug column on slug table the NOT NULL constraint (introduced here).
  • Digital object object_id foreign key is missing ON DELETE CASCADE (introduced here).
Mostly cosmetic:
  • Different constraint and key names for IO display_standard_id foreign key (introduced here).
  • Different key names on job table, for the user_id and object_id columns (introduced here).
  • Moved columns on job table: download_path and status_id (introduced here and here?).

There may be more if the upgraded database comes from an earlier version. But we should at least avoid the important ones, all of them introduced in 2.5.

History

#1 Updated by José Raddaoui Marín 3 months ago

  • Description updated (diff)

#2 Updated by José Raddaoui Marín 3 months ago

  • Description updated (diff)

#3 Updated by José Raddaoui Marín 3 months ago

  • Status changed from New to Code Review
  • Assignee changed from José Raddaoui Marín to David Juhasz

Ready for code review alongside the MySQL 8 upgrade in https://github.com/artefactual/atom/pull/997.

After this fixes, the only differences between most of the upgraded databases and a default install will be a few column and index positions. See this Gist for a comparison using the demo data (upgraded over various releases) and a new database created with the PR changes.

#4 Updated by José Raddaoui Marín about 1 month ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from David Juhasz to Dan Gillean

Ready for testing alongside the MySQL 8 upgrade (#13220). This changes are part of the upgrading/migration process.

Also available in: Atom PDF