Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #970 (closed)

Opened 16 years ago

Closed 10 years ago

Last modified 10 years ago

Bug: Examine removing/altering the UNIQUE constraint on dbpatch

Reported by: jamoore Owned by: mtbcarroll
Priority: major Milestone: 5.1.0-m2
Component: ORM Version: n.a.
Keywords: dbpatch, database, upgrade, script, sql Cc: atarkowska
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description

Currently, the dbpatch table has a UNIQUE constraint on (currentpatch, currentversion, previouspatch, previousversion). But for scripts like the upgrade needed in #903 which do not increment the patch number and therefore can perhaps be run twice, there is no way to do so.

One solution is to not make an entry in the dbpatch table, but it is good for accounting to have that done.

Another solution would be to add the message column to the UNIQUE statement, and for scripts which are to be run multiple times, have them add a timestamp or count to the message.

Change History (13)

comment:1 Changed 15 years ago by jmoore

  • Milestone changed from OMERO-Beta4 to OMERO-Beta4.1

Pushing.

comment:2 Changed 15 years ago by jmoore

  • Milestone changed from OMERO-Beta4.1 to Future

comment:3 Changed 10 years ago by jamoore

  • Cc mtbc added; cxallan removed

Mark: have you seen a need for this in any of your update scripts?

comment:4 Changed 10 years ago by jamoore

  • Cc mtbc removed
  • Milestone changed from Unscheduled to 5.1.0-m1
  • Owner changed from jamoore to mtbc
  • Priority changed from minor to major

Not exactly sure how this became a TAB, but since it is, and it's so old, guess we should just do this with the next DEV patch on 5.1.

comment:5 Changed 10 years ago by mtbcarroll

  • Owner changed from mtbc to mtbcarroll

Is it clear which solution should be adopted?

comment:6 Changed 10 years ago by jamoore

I would think the "just remove the unique" Mark. This ticket is so old it was from before the manual version checks that we add to each of the upgrade scripts. So as long as whatever you come up with is semi-sure it won't blindly repeat something that it shouldn't (update objective set magnification = 2 * magnficiation...) then we're likely fine. This is also a better table to record what we've been using the configuration table for. The only question I have is if we should retroactively add an entry for each of the beans that was auto-run on the 5.0 line.

comment:7 Changed 10 years ago by mtbcarroll

  • Status changed from new to accepted

comment:8 Changed 10 years ago by mtbcarroll

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:9 Changed 10 years ago by Josh Moore <josh@…>

  • Remaining Time set to 0

(In [10f0f527deed157584d818a8cc8cb235026e3ca5/ome.git] on branch develop) Merge pull request #2893 from mtbc/trac-970-12317-dbpatch-and-map-value

fix #970, #12317: adjust dbpatch table; delete map values with triggers

comment:10 Changed 10 years ago by mtbcarroll

  • Cc atarkowska added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from Examine removing/altering the UNIQUE constraint on dbpatch to Bug: Examine removing/altering the UNIQUE constraint on dbpatch
  • Version 3.0-M1 deleted

The fix of https://github.com/openmicroscopy/openmicroscopy/pull/2893 has the unique constraint on dbpatch violated when the user starts a server with Bio-Formats revision A, then a server with Bio-Formats revision B, then goes back to a server with Bio-Formats revision A. Perhaps it would be best to re-write the UNIQUE instead as a trigger that is rather smarter about ignoring lines where the previous and current are the same.

comment:11 Changed 10 years ago by mtbcarroll

  • Milestone changed from 5.1.0-m1 to 5.1.0-m2

This will have to wait until m2 as I am about to go on holiday for a week.

comment:12 Changed 10 years ago by mtbcarroll

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:13 Changed 10 years ago by Josh Moore <josh.moore@…>

(In [6df970c50324b747e6bfc5df1ede6c9450bf3ccc/ome.git] on branch develop) Merge pull request #3062 from mtbc/password-and-dbpatch-sql

fix #970: adjust dbpatch and password tables

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.69885 sec.)

We're Hiring!