Opened 14 years ago
Closed 13 years ago
#1591 closed task (fixed)
Upgrade script for BASE 2.17 --> 3.0
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | blocker | Milestone: | BASE 3.0 |
Component: | install | Version: | |
Keywords: | Cc: |
Description (last modified by )
The existing BASE 2.17 database should remain mainly intact, but there may be some things that we need to move around to different tables. We don't know any details yet but we'll probably need some kind of script for this. Here is a list of what we have found so far:
- Done [5621]. Remove the
affy_chip
column from theArrayDesigns
table. This column has not been used for a very long time (BASE 2.5?) - Done [5621]. Remove the
jar_path
column from thePluginDefinitions
andPluginTypes
tables. But first copy the filename (not path) to thejar_file
column in each table. - Done [5621]. Remove the
jar_path
column from theJobAgentSettings
table. - Done [5621]. Remove references to
jarPath
property from context filters, sort settings, etc. forPLUGINDEFINITION
andPLUGINTYPE
. - Done [5624]. Remove four properties for validator and metadata extractor from
DataFileType
and drop the four database columns. - Done [5703]. Copy information in
BioMaterialEventSources
toBioMaterialEventSources2
so that parent-child linking of biomaterial is retained. Remove theBioMaterialEventSources
table. - Done [5703], [5730]. Set
BioMaterials.parent_type
andparent_id
column based on parent/child information. Remove thepooled
column. - Done [5703]. Convert
LabeledExtract
toExtract
items by updating theBioMaterials.discriminator
column. All "soft" relations (eg. item_type+item_id pairs) need to update the item_type column (204->203). Set the subtype on all existing labeled extracts. - Done [5703]. Convert
Label
toTag
. Set the subtype on all existing labels. - Done [5703]. Convert
Hybridization
toPhysicalBioAssay
. Copy information from theHybridizations
table toPhysicalBioAssays
. Set new id onBioMaterialEvents.physicalbioassay_id
column. RemoveBioMaterialEvents.hybridization_id
column. All "soft" relations (eg. item_type+item_id pairs) need to update the item_type column (261->267). Set the subtype on all existing hybridizations. - Done [5703], [5730], [5734]. Convert
Scan
toDerivedBioAssay
. Copy information from theScans
table toDerivedBioAssays
. Copy information fromImages
table toFileSetMember
. All "soft" relations (eg. item_type+item_id pairs) need to update the item_type column (262->268). Set the subtype on all existing scans. - Done [5733]. Update
RawBioAssay
to point to the derived bioassay instead of the scan. Removescan_id
column. Populateextract_id
column based on information in thearray_num
and the positions of biomaterials on the linked hybridization. - Done [5730]. Drop unique contraint on
FileSetMember
table forfileset_id
anddatafiletype_id
columns. - Done [5733]. Set
allow_multiple=false
for all existing platform file types. - Done [5703], [5730]. Convert
ProtocolType
,HardwareType
,SoftwareType
andFileType
toItemSubtype
and make sure all hard and soft references are updated. Drop tables and columns that are no longer used. - Done [5734]. Deprecate and disable batch importers:
LabeledExtractImporter
,HybridizationImporter
,ScanImporter
. - Done [5803]. Project default items are stored as a
ParameterValues
list instead ofAnyToAny
links. - Done [5828]. Encrypt existing passwords with bcrypt.
Change History (33)
comment:1 by , 14 years ago
Milestone: | → BASE 3.0 |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Description: | modified (diff) |
---|
comment:4 by , 14 years ago
comment:5 by , 14 years ago
Description: | modified (diff) |
---|
comment:6 by , 13 years ago
Description: | modified (diff) |
---|
comment:7 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:8 by , 13 years ago
comment:9 by , 13 years ago
Description: | modified (diff) |
---|
comment:10 by , 13 years ago
Description: | modified (diff) |
---|
comment:11 by , 13 years ago
comment:12 by , 13 years ago
Description: | modified (diff) |
---|
comment:13 by , 13 years ago
comment:14 by , 13 years ago
Description: | modified (diff) |
---|
comment:15 by , 13 years ago
Description: | modified (diff) |
---|
comment:16 by , 13 years ago
comment:17 by , 13 years ago
Description: | modified (diff) |
---|
comment:18 by , 13 years ago
comment:19 by , 13 years ago
Description: | modified (diff) |
---|
comment:20 by , 13 years ago
(In [5734]) References #1591: Upgrade script for BASE 2.17 --> 3.0
- The file for an image can be null, skip those when updating
- Deprecated batch importers that have been replaced with new ones (labeled extract, hybridization and scan importer). The update will disable the old plug-ins.
- Disable BioAssaySetExporter if it is still present in the database. The plug-in no longer exists in the api.
- Remove role keys and plug-in keys for item types that no longer exists (labeled extract, hyb, scan, software type, hardware type, etc.)
comment:21 by , 13 years ago
Description: | modified (diff) |
---|
The update script seems to be working on our test database and also on the demo server database. It has only been tested with MySQL so far but I think it doesn't work on a PostgreSQL database. Unless something really big comes up, any remaining issues will be fixed after the alfa release.
comment:22 by , 13 years ago
(In [5736]) References #1591: Upgrade script for BASE 2.17 --> 3.0
Disable all plug-ins during the first part of the update. Core plug-ins are later re-enabled near the end of the installation. External plug-ins should be re-installed from a BASE 3-compatible pacakge. If no such package exists, the admin may try to manually re-install the old plug-in.
comment:23 by , 13 years ago
(In [5753]) References #1591: Upgrade script for BASE 2.17 --> 3.0
Update AnnotationSet
using id instead of item_type and item_id which should be a lot quicker and we have to try updating items without annotations.
Using a temporary index on ItemValues.data_class_id
to make updating quicker. The index is dropped after the update.
Display ... as indication of progress if things take a long time.
comment:24 by , 13 years ago
comment:25 by , 13 years ago
(In [5756]) References #1591: Upgrade script for BASE 2.17 --> 3.0
Several changes for supporting PostgreSQL when upgrading.
- Different syntax for dropping foreign keys
- Different syntax for dropping indexes
- Items are not INSERTED until flush/commit so we must do some manual flushing before we can issue batch UPDATE statements referencing the new items (MySQL do INSERT when save() is called)
- Different syntax is needed to let INSERT INTO ... SELECT FROM ... generate ID values for the new rows.
comment:26 by , 13 years ago
Description: | modified (diff) |
---|
comment:27 by , 13 years ago
comment:28 by , 13 years ago
Description: | modified (diff) |
---|
comment:29 by , 13 years ago
(In [5833]) References #1591: Upgrade script for BASE 2.17 --> 3.0
Check login and password before actually doing any changes. Previously, the check was not made until a lot of changes had been made to the database and it was impossible to retry again without restoring the 2.17 database from a backup.
NOTE! A BACKUP IS STILL NEEDED! It was just annoying to have to use it because the root password was incorrect.
comment:30 by , 13 years ago
comment:31 by , 13 years ago
comment:32 by , 13 years ago
Description: | modified (diff) |
---|
comment:33 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [5592]) References #1591: Upgrade script for BASE 2.17 --> 3.0
Removed almost everything from Update.java since we will only support upgrading from BASE 2.17.