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

Version bump to 3.0.0-rc3

parent 8f70ec15
Branches
Tags
No related merge requests found
#!/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
# Copyright (C) 2020 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com>
#
# 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
#
# new entity_version table
# Update mysql schema to version v3.0.0-rc3
NEW_VERSION="v3.0.0-rc3"
OLD_VERSION="v3.0.0-rc2"
if [ -z "$UTILSPATH" ]; then
UTILSPATH="../utils"
fi
. $UTILSPATH/patch_header.sh $*
check_version $OLD_VERSION
mysql_execute_file $PATCH_DIR/update_archive_isa.sql
update_version $NEW_VERSION
success
/*
* This file is a part of the CaosDB Project.
*
* Copyright (C) 2020 IndiScale GmbH <info@indiscale.com>
* Copyright (C) 2020 Timm Fitschen <t.fitschen@indiscale.com>
*
* 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/>.
*/
-- Create tables for versioning.
ALTER TABLE archive_isa
ADD COLUMN `direct` BOOLEAN DEFAULT TRUE;
...@@ -50,10 +50,10 @@ BEGIN ...@@ -50,10 +50,10 @@ BEGIN
FROM entity_version FROM entity_version
WHERE entity_id = EntityID; WHERE entity_id = EntityID;
-- move to archive_isa before deleting (only direct child-parent relations) -- move to archive_isa before deleting
INSERT IGNORE INTO archive_isa (child, child_iversion, parent) INSERT IGNORE INTO archive_isa (child, child_iversion, parent, direct)
-- TODO copy rpath as well -- TODO copy rpath as well
SELECT e.child, IVersion AS child_iversion, e.parent SELECT e.child, IVersion AS child_iversion, e.parent, rpath = EntityID
FROM isa_cache AS e FROM isa_cache AS e
WHERE e.child = EntityID; WHERE e.child = EntityID;
END IF; END IF;
......
...@@ -78,18 +78,19 @@ retrieveEntityParentsBody: BEGIN ...@@ -78,18 +78,19 @@ retrieveEntityParentsBody: BEGIN
SELECT SELECT
i.parent AS ParentID, i.parent AS ParentID,
( SELECT value FROM archive_name_data ( SELECT value FROM name_data
WHERE domain_id = 0 WHERE domain_id = 0
AND entity_id = ParentID AND entity_id = ParentID
AND property_id = 20 AND property_id = 20
AND _iversion = IVersion) AS ParentName, ) AS ParentName, -- This is not necessarily the name of the parent at the time of IVersion but it is a good guess. Future implementations of the archive_isa table should also store the IVersion of the parents. Only then the historically correct ParentName can be reconstructed.
e.description AS ParentDescription, e.description AS ParentDescription,
e.role AS ParentRole, e.role AS ParentRole,
(SELECT acl FROM entity_acl AS a WHERE a.id = e.acl) AS ACL (SELECT acl FROM entity_acl AS a WHERE a.id = e.acl) AS ACL
FROM archive_isa AS i JOIN entities AS e FROM archive_isa AS i JOIN entities AS e
ON (i.parent = e.id) ON (i.parent = e.id)
WHERE i.child = EntityID WHERE i.child = EntityID
AND i.child_iversion = IVersion; AND i.child_iversion = IVersion
AND i.direct IS TRUE;
LEAVE retrieveEntityParentsBody; LEAVE retrieveEntityParentsBody;
END IF; END IF;
......
...@@ -2539,13 +2539,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','entityACL','N ...@@ -2539,13 +2539,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','entityACL','N
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','entityACL','DEFINER',''); SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','entityACL','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','entityACL','CONTAINS SQL',''); SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','entityACL','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.finishNegationFilter
SELECT tap.has_procedure('_caosdb_schema_unit_tests','finishNegationFilter','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','finishNegationFilter','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','finishNegationFilter','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','finishNegationFilter','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.finishSubProperty -- PROCEDURES _caosdb_schema_unit_tests.finishSubProperty
SELECT tap.has_procedure('_caosdb_schema_unit_tests','finishSubProperty',''); SELECT tap.has_procedure('_caosdb_schema_unit_tests','finishSubProperty','');
...@@ -2595,27 +2588,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','initBackRefer ...@@ -2595,27 +2588,6 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','initBackRefer
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','initBackReference','DEFINER',''); SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','initBackReference','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','initBackReference','CONTAINS SQL',''); SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','initBackReference','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.initConjunctionFilter
SELECT tap.has_procedure('_caosdb_schema_unit_tests','initConjunctionFilter','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','initConjunctionFilter','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','initConjunctionFilter','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','initConjunctionFilter','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.initDisjunctionFilter
SELECT tap.has_procedure('_caosdb_schema_unit_tests','initDisjunctionFilter','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','initDisjunctionFilter','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','initDisjunctionFilter','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','initDisjunctionFilter','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.initNegationFilter
SELECT tap.has_procedure('_caosdb_schema_unit_tests','initNegationFilter','');
SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','initNegationFilter','NO','');
SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','initNegationFilter','DEFINER','');
SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','initNegationFilter','CONTAINS SQL','');
-- PROCEDURES _caosdb_schema_unit_tests.initPOVRefidsTable -- PROCEDURES _caosdb_schema_unit_tests.initPOVRefidsTable
SELECT tap.has_procedure('_caosdb_schema_unit_tests','initPOVRefidsTable',''); SELECT tap.has_procedure('_caosdb_schema_unit_tests','initPOVRefidsTable','');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment