Skip to content
Snippets Groups Projects
Verified Commit a213a3fd authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: update patch to new name_data

parent 7a320598
No related branches found
No related tags found
1 merge request!12DRAFT: ENH: file system: core
#!/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
...@@ -15,7 +15,8 @@ ALTER TABLE files ADD COLUMN IF NOT EXISTS ( ...@@ -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; 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; UPDATE files SET storageId=path;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment