diff --git a/patches/patch20200623-3.0.0rc2/patch.sh b/patches/patch20200623-3.0.0rc2/patch.sh new file mode 100755 index 0000000000000000000000000000000000000000..fc12d03bf5da35b0449009042b8abea6b49bd7c8 --- /dev/null +++ b/patches/patch20200623-3.0.0rc2/patch.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# ** header v3.0 +# This file is a part of the CaosDB Project. +# +# Copyright (C) 2018 Research Group Biomedical Physics, +# Max-Planck-Institute for Dynamics and Self-Organization Göttingen +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# ** end header +# + +# Refactors the entities table and move all names to name_data +# Update mysql schema to version v3.0.0-rc1 +NEW_VERSION="v3.0.0-rc2" +OLD_VERSION="v3.0.0-rc1" + +if [ -z "$UTILSPATH" ]; then + UTILSPATH="../utils" +fi + +. $UTILSPATH/patch_header.sh $* + + +check_version $OLD_VERSION + +mysql_execute_file $PATCH_DIR/patch.sql + +update_version $NEW_VERSION + +success + diff --git a/tests/test_0_next_patch.sql b/patches/patch20200623-3.0.0rc2/patch.sql similarity index 90% rename from tests/test_0_next_patch.sql rename to patches/patch20200623-3.0.0rc2/patch.sql index e55e4884d3d1e180761d28b758dc412319f1c31e..eca07fafd56d9122686ac6ddb7bfaef8eadc595c 100644 --- a/tests/test_0_next_patch.sql +++ b/patches/patch20200623-3.0.0rc2/patch.sql @@ -15,7 +15,8 @@ ALTER TABLE files ADD COLUMN IF NOT EXISTS ( ALTER TABLE entities MODIFY COLUMN `role` enum('RECORDTYPE','RECORD','FILE','DOMAIN','PROPERTY','DATATYPE','ROLE','QUERYTEMPLATE', 'DIRECTORY') COLLATE utf8_unicode_ci NOT NULL; -INSERT IGNORE INTO entities (id, name, description, role, acl) VALUES (9, "DIRECTORY", "The directory role.", "ROLE", 0); +INSERT IGNORE INTO entities (id, description, role, acl) VALUES (9, "The directory role.", "ROLE", 0); +INSERT IGNORE INTO name_data (domain_id, entity_id, property_id, value, status, pidx) VALUES (0, 9, 20, "DIRECTORY", "FIX", 0); UPDATE files SET storageId=path;