Need more "IF EXISTS" clauses in 2.3-2.4.0-upgrade-db.sql

Bug #1205061 reported by Robert Soulliere
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.7
Fix Released
Undecided
Unassigned
2.8
Fix Released
Undecided
Unassigned

Bug Description

EG Version: 2.3 - 2.4 upgrade

When upgrading from 2.3 to 2.4 the 2.3-2.4.0-upgrade-db.sql would report errors and ROLLBACK changes because it was trying to drop non-existent entities.

Could "IF EXISTS" clauses be added to these line and other DROP statements in order to alleviate this?

Here are some examples with line numbers where the script was "Rolling back" becuase of non-existent entities being dropped:

 75 DROP INDEX metabib.metabib_author_field_entry_value_idx;

1928 DROP RULE protect_bib_rec_delete ON biblio.record_entry;

2183 DROP CONSTRAINT z3950_attr_source_fkey,

Tags: pullrequest
Revision history for this message
Ben Shum (bshum) wrote :

Marking potential series targets for 2.4 and 2.5.

Changed in evergreen:
milestone: none → 2.5.1
status: New → Triaged
importance: Undecided → Medium
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.5.1 → 2.5.2
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.2 → none
Revision history for this message
Ben Shum (bshum) wrote :

Created a working branch to address this, just quickly put "IF EXISTS" next to all the DROP statements in the 2.3-2.4 version upgrade script. Even though this is an old branch, figure we can still fixup this legacy script.

See branch: user/bshum/lp1205061-quick-fix

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/bshum/lp1205061-quick-fix

Revision history for this message
Ben Shum (bshum) wrote :

Added an additional cleanup commit to remove older versions of the 2.3-2.4 scripts from 2.4 alpha and RC times. These extra scripts are unnecessary and might cause confusion if used.

tags: added: pullrequest
no longer affects: evergreen/2.4
Changed in evergreen:
milestone: none → 2.8-beta
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.8-beta → 2.8.1
Changed in evergreen:
milestone: 2.8.1 → 2.9-alpha
no longer affects: evergreen/2.6
Changed in evergreen:
status: Triaged → Fix Committed
Changed in evergreen:
milestone: 2.9-alpha → 2.9-beta
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.