Ignore:
Timestamp:
Oct 8, 2015, 8:20:56 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #1941: Store experimental factor values as part experiments

When updating a MySQL installation it is not possible to drop indexes without also dropping foreign keys that use the same columns. After dropping the index, the foreign keys need to be re-created. In schema version 124 we need to drop the unique index on annotationset_id+annotationtype_id in the Annotations table since cloning annotations means that there can be multiple annotations for the same annotation type.

When updating a MySQL installation it is not possible to drop a NOT NULL constraint on a column. Instead the column definition must be modified as if a new column was created without a NOT NULL constraint. This requires that we know the data type of the column. Since the SQL to do this is so different from how PostgreSQL does this, we put this in the mysql-queries.xml file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6-stable/config/dist/mysql-queries.xml

    r6330 r6976  
    2828-->
    2929<predefined-queries>
     30  <query id="DROP_NOT_NULL_CONSTRAINT" type="SQL">
     31    <sql>
     32      ALTER TABLE [{1}] MODIFY [{2}] {3} NULL
     33    </sql>
     34    <description>
     35      An SQL query that drops a NOT NULL contraint from column (2) with data type (3)
     36      in a table (1).
     37    </description>
     38  </query>
    3039
    3140</predefined-queries>
Note: See TracChangeset for help on using the changeset viewer.