source: branches/3.6-stable/config/dist/mysql-queries.xml @ 6976

Last change on this file since 6976 was 6976, checked in by Nicklas Nordborg, 6 years ago

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.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Date Id
File size: 1.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE predefined-queries SYSTEM "predefined-queries.dtd" >
3<!--
4  $Id: mysql-queries.xml 6976 2015-10-08 06:20:56Z nicklas $
5
6  Copyright (C) 2006 Nicklas Nordborg
7
8  This file is part of BASE - BioArray Software Environment.
9  Available at http://base.thep.lu.se/
10
11  BASE is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License
13  as published by the Free Software Foundation; either version 3
14  of the License, or (at your option) any later version.
15
16  BASE is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  GNU General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with BASE. If not, see <http://www.gnu.org/licenses/>.
23-->
24<!--
25  This file contains HQL and SQL queries that have been modified
26  specifically for the MySQL database and overrides the queries
27  found in the common-queries.xml file.
28-->
29<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>
39
40</predefined-queries>
Note: See TracBrowser for help on using the repository browser.