Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #11516: add upgrade scripts from 4.4 to 5.0 #1691

Merged
merged 6 commits into from Nov 1, 2013

Conversation

mtbc
Copy link
Member

@mtbc mtbc commented Oct 30, 2013

A good way to test the upgrade may be to import some data into 4.4, actually do the upgrade, and see if the system still works okay. I tried to make the SQL scripts actually quite human-readable.

Fixes http://trac.openmicroscopy.org.uk/ome/ticket/11516.

CONSTRAINT fkfilesetversioninfo_owner_id_experimenter FOREIGN KEY (owner_id) REFERENCES experimenter,
CONSTRAINT fkfilesetversioninfo_update_id_event FOREIGN KEY (update_id) REFERENCES event
);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented-out part following is basically a way of skipping the usual fresh-install process in which we create these tables, then drop them, that allows us to remember what the tables actually would have been.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentinoed to @mtbc, these commented section is just a byproduct of Hibernate's SQL generation. It can be removed in the next PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in #1723.

@will-moore
Copy link
Member

Looks good:

psql -h localhost -U omero omero < sql/psql/OMERO5.0DEV__6/OMERO4.4__0.sql
BEGIN
CREATE FUNCTION
 omero_assert_db_version 
-------------------------

(1 row)

DROP FUNCTION
INSERT 0 1
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "checksumalgorithm_pkey" for table "checksumalgorithm"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "checksumalgorithm_external_id_key" for table "checksumalgorithm"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "checksumalgorithm_value_key" for table "checksumalgorithm"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "fileset_pkey" for table "fileset"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "fileset_external_id_key" for table "fileset"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "filesetannotationlink_pkey" for table "filesetannotationlink"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetannotationlink_external_id_key" for table "filesetannotationlink"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetannotationlink_parent_child_owner_id_key" for table "filesetannotationlink"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "filesetentry_pkey" for table "filesetentry"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetentry_external_id_key" for table "filesetentry"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetentry_fileset_fileset_index_key" for table "filesetentry"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "filesetjoblink_pkey" for table "filesetjoblink"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetjoblink_external_id_key" for table "filesetjoblink"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetjoblink_parent_parent_index_key" for table "filesetjoblink"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetjoblink_parent_child_owner_id_key" for table "filesetjoblink"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "filesetversioninfo_pkey" for table "filesetversioninfo"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "filesetversioninfo_external_id_key" for table "filesetversioninfo"
CREATE TABLE
CREATE VIEW
CREATE VIEW
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "indexingjob_pkey" for table "indexingjob"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "integritycheckjob_pkey" for table "integritycheckjob"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "metadataimportjob_pkey" for table "metadataimportjob"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pixeldatajob_pkey" for table "pixeldatajob"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "thumbnailgenerationjob_pkey" for table "thumbnailgenerationjob"
CREATE TABLE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "uploadjob_pkey" for table "uploadjob"
CREATE TABLE
CREATE SEQUENCE
CREATE SEQUENCE
...
CREATE TABLE
CREATE FUNCTION
CREATE TRIGGER
UPDATE 1
                                 status                                 
------------------------------------------------------------------------
                                                                       +
                                                                       +
                                                                       +
 YOU HAVE SUCCESSFULLY UPGRADED YOUR DATABASE TO VERSION OMERO5.0DEV__6+
                                                                       +
                                                                       +

(1 row)

COMMIT

Browsing images, S/P/W and big image all seem to be fine after upgrade.

joshmoore added a commit that referenced this pull request Nov 1, 2013
fix #11516: add upgrade scripts from 4.4 to 5.0
@joshmoore joshmoore merged commit 1217c42 into ome:develop Nov 1, 2013
@mtbc mtbc deleted the db-upgrade-11516 branch November 1, 2013 11:58
@joshmoore
Copy link
Member

--no-rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants