Bug #13221

Avoid schema differences between a default install and an upgraded database

Added by José Raddaoui Marín 11 months ago. Updated 4 months ago.

Status:VerifiedStart date:12/05/2019
Priority:MediumDue date:
Assignee:-% 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.


Related issues

Related to Access to Memory (AtoM) - Bug #13350: Reduce the likelihood of issues in upgrades from 1.x to 2... Verified 06/11/2020

History

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

  • Description updated (diff)

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

  • Description updated (diff)

#3 Updated by José Raddaoui Marín 11 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 10 months 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.

#5 Updated by Dan Gillean 5 months ago

  • Status changed from QA/Review to Verified
  • Assignee deleted (Dan Gillean)

#6 Updated by José Raddaoui Marín 4 months ago

  • Related to Bug #13350: Reduce the likelihood of issues in upgrades from 1.x to 2.6.x added

#7 Updated by José Raddaoui Marín 4 months ago

Found a couple of "cosmetic" issues after testing the upgrade from 1.x in #13350:

- Different constraint name on slug table, object_id foreign key (introduced here).
- Different key name on digital_object table, parent_id column (introduced here).

#8 Updated by José Raddaoui Marín 4 months ago

https://github.com/artefactual/atom/pull/1134

I don't think we should worry to test this, so I'll keep the ticket as verified ;)

Also available in: Atom PDF