diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e41b4611e97316a25933db6ecaf0c51b79f00be..5bc1533ad0daaf92801a07ad69d9330590e59fbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,16 +7,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## +This is a major update. Switching from integer ids for internal and external use to string ids for the external use while keeping the old integer ids for internal use. + ### Added ### +* Table `entity_ids` +* Procedure `getIdByName` +* Procedure `insertEntityDataType` and `insertEntityCollection` +* Procedure `setFileProperties`. + ### Changed ### +* Rename PROCEDURE `registerSubdomain` to `registerReplacementIds`. +* Change column `entities.role` datatype: replace 'DOMAIN' enum value with `_REPLACEMENT`. +* Change column `transactions_log.entity_id` to VARCHAR(255) +* Change column `user_info.entity` to VARCHAR(255) +* Change signature of procedure `applyIDFilter` - `EntityID VARCHAR(255)` +* Change signature of procedure `initBackreference` - `EntityID VARCHAR(255)` and `PropertyID VARCHAR(255)` +* Change signature of procedure `initPOVPropertiesTable` - `PropertyID VARCHAR(255)` +* Change signature of procedure `initPOVRefidsTable` - `PropertyID VARCHAR(255)` +* Change signature of procedure `initSubEntity` - `EntityID VARCHAR(255)` +* Change signature of procedure `deleteEntity` - `EntityID VARCHAR(255)` +* Change signature of procedure `deleteEntityProperties` - `EntityID VARCHAR(255)` +* Change signature of procedure `get_primary_parent_version` - `EntityID VARCHAR(255)` +* Change signature of procedure `get_version_timestamp` - `EntityID VARCHAR(255)` +* Change signature of procedure `get_head_version` - `EntityID VARCHAR(255)` +* Change signature of procedure `get_head_relative` - `EntityID VARCHAR(255)` +* Change signature of procedure `get_version_history` - `EntityID VARCHAR(255)` +* Change signature of procedure `retrieveQueryTemplateDef` - `EntityID VARCHAR(255)` +* Change signature of procedure `getDependentEntities` - `EntityID VARCHAR(255)` +* Change signature of procedure `insertEntity` - Add parameter `EntityID VARCHAR(255)` +* Change signature of procedure `insertEntityProperty` - `EntityID VARCHAR(255)` and `PropertyID VARCHAR(255)`, `DomainID VARCHAR(255)`, `DatatypeOverride VARCHAR(255)` +* Change signature of procedure `insertIsa` - `ChildID VARCHAR(255)`, `ParentID VARCHAR(255)`. +* Change signature of procedure `isSubtype` - `ChildID VARCHAR(255)`, `ParentID VARCHAR(255)`. +* Change signature of procedure `retrieveEntity` - `EntityID VARCHAR(255)` +* Change signature of procedure `retrieveOverrides` - `EntityID VARCHAR(255)`, `DomainID VARCHAR(255)` +* Change signature of procedure `retrieveEntityParents` - `EntityID VARCHAR(255)` +* Change signature of procedure `retrieveEntityProperties` - `EntityID VARCHAR(255)`, `DomainID VARCHAR(255)` +* Change signature of procedure `updateEntity` - `EntityID VARCHAR(255)` + ### Deprecated ### ### Removed ### +* Deactivate procedure `delete_all_entity_versions`. This might be used in the + future, that why we keep the code in a comment. +* Drop procedure `retrieveSubEntity` +* Drop procedure `retrieveDatatype` +* Drop procedure `retrieveGroup` +* Drop procedure `getInfo` +* Drop procedure `getRole` +* Drop procedure `setPassword` +* Drop procedure `initAutoIncrement` +* Delete special entity 50 (SQLite Datatype) +* Delete special entity 99 (Work-around for the auto-increment) + ### Fixed ### +* Change signature of procedure `getFileIdByPath` - `FilePath TEXT` - this length is needed for the path column of `file_entities`. + ### Security ### ## [5.0.0] - 2021-10-28 ## diff --git a/patches/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql b/patches/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql index 72356921a8cffa0d734f2b1394f4d54d46a78d8b..71bc6d3d92205b82905a68453904ee71e6e9942d 100644 --- a/patches/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql +++ b/patches/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql @@ -1,3 +1,23 @@ +/* + * This file is a part of the CaosDB Project. + * + * Copyright (C) 2022-2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2022-2023 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/>. + */ + -- a little bit of house keeping DROP PROCEDURE IF EXISTS retrieveSubEntity; DROP PROCEDURE IF EXISTS retrieveDatatype; @@ -10,6 +30,14 @@ DELETE FROM name_data WHERE entity_id=50; DELETE FROM entities WHERE id=50; DELETE FROM entities WHERE id=99; +-- this simply is the more appropriate name +ALTER TABLE entities MODIFY COLUMN + `role` enum('RECORDTYPE','RECORD','FILE','DOMAIN','PROPERTY','DATATYPE','ROLE','QUERYTEMPLATE', '_REPLACEMENT') COLLATE utf8_unicode_ci NOT NULL; +UPDATE entities SET role = "_REPLACEMENT" WHERE role="DOMAIN"; +ALTER TABLE entities MODIFY COLUMN + `role` enum('RECORDTYPE','RECORD','FILE','_REPLACEMENT','PROPERTY','DATATYPE','ROLE','QUERYTEMPLATE') COLLATE utf8_unicode_ci NOT NULL; + + -- new entity_ids table DROP TABLE IF EXISTS `entity_ids`; diff --git a/procedures/deleteEntityProperties.sql b/procedures/deleteEntityProperties.sql index cc9676f077560be6b861c0d37b9e863d0fe5ae6b..71b5651c58f5162752a4728c935a4a1a4ce66736 100644 --- a/procedures/deleteEntityProperties.sql +++ b/procedures/deleteEntityProperties.sql @@ -1,11 +1,10 @@ /* - * ** 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> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 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 @@ -19,8 +18,6 @@ * * 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 */ DROP PROCEDURE IF EXISTS db_5_0.deleteEntityProperties; diff --git a/procedures/deleteIsaCache.sql b/procedures/deleteIsaCache.sql index a792c20e8f99211ca4e1ee3e173a3e4b5e612229..dcfb68cf694458b56401720da8c939baae770247 100644 --- a/procedures/deleteIsaCache.sql +++ b/procedures/deleteIsaCache.sql @@ -3,8 +3,8 @@ * * 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> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 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 diff --git a/procedures/entityVersioning.sql b/procedures/entityVersioning.sql index 155ab7e45c204e4fb9f74eb647f5d0311e83792b..b474d0121130a1695d69616e1de4cc54468b5e64 100644 --- a/procedures/entityVersioning.sql +++ b/procedures/entityVersioning.sql @@ -1,8 +1,8 @@ /* * 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> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 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 diff --git a/procedures/getDependentEntities.sql b/procedures/getDependentEntities.sql index 17ee476ee6c425199c9cb78bef6aab61dafcf930..6272fd00f9329e3f176563d8fce01a63e0849d20 100644 --- a/procedures/getDependentEntities.sql +++ b/procedures/getDependentEntities.sql @@ -1,9 +1,10 @@ /* - * ** 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) 2023 IndiScale GmbH <www.indiscale.com> + * Copyright (C) 2023 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 @@ -18,11 +19,9 @@ * 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 */ - DROP PROCEDURE IF EXISTS db_5_0.getDependentEntities; delimiter // diff --git a/procedures/insertEntity.sql b/procedures/insertEntity.sql index 54b89ba59aac7c309a7a96e0691068868079d553..4b385f202e66b8dea2a8ebe1aa66322718e629a9 100644 --- a/procedures/insertEntity.sql +++ b/procedures/insertEntity.sql @@ -3,8 +3,8 @@ * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen - * Copyright (C) 2020 - 2022 IndiScale GmbH <info@indiscale.com> - * Copyright (C) 2020 - 2022 Timm Fitschen <t.fitschen@indiscale> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 Timm Fitschen <t.fitschen@indiscale> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as diff --git a/procedures/insertFile.sql b/procedures/insertFile.sql deleted file mode 100644 index 385f972b722118c0269b2394e8e540364035c134..0000000000000000000000000000000000000000 --- a/procedures/insertFile.sql +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is a part of the CaosDB Project. - * - * Copyright (C) 2023 IndiScale GmbH <info@indiscale.com> - * Copyright (C) 2023 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/>. - */ - -DROP PROCEDURE IF EXISTS db_5_0.insertFile; -/* -DELIMITER // - */ - -/* - * Insert the file properties of a File entity. - * - * Parameters - * ---------- - * EntityID : VARCHAR(255) - * The file's id. - * Hash : VARCHAR(255) - * A Sha512 Hash of the file. - * FilePath : TEXT - * Path of the file in the internal file system. If NULL, an existing file - * entity is simply deleted. - * FileSize : BIGINT UNSIGNED - * Size of the file in bytes. - */ - -/* -CREATE PROCEDURE db_5_0.insertFile(in EntityID VARCHAR(255), in Hash VARCHAR(255), in FileSize BIGINT UNSIGNED, in FilePath TEXT) -BEGIN - DECLARE InternalEntityID INT UNSIGNED DEFAULT NULL; - SELECT internal_id INTO InternalEntityID FROM entity_ids WHERE id=EntityID; - - INSERT INTO files (file_id, hash, size, path) VALUES (InternalEntityID, unhex(Hash), FileSize, FilePath); - -END; -// -DELIMITER ; -*/ diff --git a/procedures/insertIsaCache.sql b/procedures/insertIsaCache.sql index f7ed7d8a8352ba059a82848312e59b5df007101f..f08ff610c9cb68fcfde4a305b770a3ba254f5329 100644 --- a/procedures/insertIsaCache.sql +++ b/procedures/insertIsaCache.sql @@ -1,10 +1,10 @@ /* - * ** 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,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 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 @@ -18,8 +18,6 @@ * * 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 */ DROP PROCEDURE IF EXISTS db_5_0.insertIsa; DELIMITER // diff --git a/procedures/registerSubdomain.sql b/procedures/registerSubdomain.sql index e914f1e329726dcbac7dea1adec2efa7546bd35d..2fc04ccb082ef080b7b7ae238b32cc3a7f6b415f 100644 --- a/procedures/registerSubdomain.sql +++ b/procedures/registerSubdomain.sql @@ -3,6 +3,8 @@ * * Copyright (C) 2018 Research Group Biomedical Physics, * Max-Planck-Institute for Dynamics and Self-Organization Göttingen + * Copyright (C) 2023 IndiScale GmbH <www.indiscale.com> + * Copyright (C) 2023 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 @@ -17,26 +19,24 @@ * 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/>. */ - - - DROP PROCEDURE IF EXISTS db_5_0.registerSubdomain; +DROP PROCEDURE IF EXISTS db_5_0.registerReplacementIds; delimiter // -CREATE PROCEDURE db_5_0.registerSubdomain(in amount INT UNSIGNED) +CREATE PROCEDURE db_5_0.registerReplacementIds(in amount INT UNSIGNED) BEGIN DECLARE ED INTEGER DEFAULT NULL; - SELECT COUNT(id) INTO ED FROM entities WHERE Role='DOMAIN' AND id!=0; + SELECT COUNT(id) INTO ED FROM entities WHERE Role='_REPLACEMENT' AND id!=0; WHILE ED < amount DO INSERT INTO entities (description, role, acl) VALUES - (NULL, 'DOMAIN', 0); + (NULL, '_REPLACEMENT', 0); SET ED = ED + 1; END WHILE; - SELECT e.id as DomainID FROM entities AS e WHERE e.Role='DOMAIN' and e.id!=0; + SELECT e.id as ReplacementID FROM entities AS e WHERE e.Role='_REPLACEMENT' and e.id!=0; END; // diff --git a/procedures/setFileProperties.sql b/procedures/setFileProperties.sql index 2c2cfc17bbeb9cc7e2b3ed07fb43362810d9aafe..e1efa3f4c200f37a4d1c1769ca6db1d31d27f62a 100644 --- a/procedures/setFileProperties.sql +++ b/procedures/setFileProperties.sql @@ -1,8 +1,8 @@ /* * 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> + * Copyright (C) 2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2023 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 diff --git a/tests/test_autotap.sql b/tests/test_autotap.sql index acaa8967028151b28bf5b7003a64164f0ce70474..1ae650e346e3cd79e5396af177c6c14ffb875ea1 100644 --- a/tests/test_autotap.sql +++ b/tests/test_autotap.sql @@ -724,7 +724,7 @@ SELECT tap.col_collation_is('_caosdb_schema_unit_tests','entities','description' -- COLUMN entities.role SELECT tap.has_column('_caosdb_schema_unit_tests','entities','role',''); -SELECT tap.col_column_type_is('_caosdb_schema_unit_tests','entities','role','enum(\'RECORDTYPE\',\'RECORD\',\'FILE\',\'DOMAIN\',\'PROPERTY\',\'DATATYPE\',\'ROLE\',\'QUERYTEMPLATE\')',''); +SELECT tap.col_column_type_is('_caosdb_schema_unit_tests','entities','role','enum(\'RECORDTYPE\',\'RECORD\',\'FILE\',\'_REPLACEMENT\',\'PROPERTY\',\'DATATYPE\',\'ROLE\',\'QUERYTEMPLATE\')',''); SELECT tap.col_extra_is('_caosdb_schema_unit_tests','entities','role','',''); SELECT tap.col_default_is('_caosdb_schema_unit_tests','entities','role',NULL,''); SELECT tap.col_charset_is('_caosdb_schema_unit_tests','entities','role','utf8',''); @@ -2635,12 +2635,12 @@ SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','raiseWarning' SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','raiseWarning','DEFINER',''); SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','raiseWarning','CONTAINS SQL',''); --- PROCEDURES _caosdb_schema_unit_tests.registerSubdomain +-- PROCEDURES _caosdb_schema_unit_tests.registerReplacementIds -SELECT tap.has_procedure('_caosdb_schema_unit_tests','registerSubdomain',''); -SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','registerSubdomain','NO',''); -SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','registerSubdomain','DEFINER',''); -SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','registerSubdomain','CONTAINS SQL',''); +SELECT tap.has_procedure('_caosdb_schema_unit_tests','registerReplacementIds',''); +SELECT tap.procedure_is_deterministic('_caosdb_schema_unit_tests','registerReplacementIds','NO',''); +SELECT tap.procedure_security_type_is('_caosdb_schema_unit_tests','registerReplacementIds','DEFINER',''); +SELECT tap.procedure_sql_data_access_is('_caosdb_schema_unit_tests','registerReplacementIds','CONTAINS SQL',''); -- PROCEDURES _caosdb_schema_unit_tests.initSubProperty diff --git a/tests/test_entity_versioning.sql b/tests/test_entity_versioning.sql index 4f8e8fab5a5ecd34d7df74e47ab09086e0635a67..f7c52a210c8baef8e781142ff645122ce95ec4fe 100644 --- a/tests/test_entity_versioning.sql +++ b/tests/test_entity_versioning.sql @@ -1,9 +1,8 @@ /** - * ** header v3.0 * 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> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 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 @@ -17,8 +16,6 @@ * * 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 */ USE _caosdb_schema_unit_tests; diff --git a/tests/test_insert_update_delete.sql b/tests/test_insert_update_delete.sql index 20b3a3f59098a15a3ae8036f1a86d2ec9a17b805..ff1e4ec3acc6fe0121ff168279fe7659e05a914c 100644 --- a/tests/test_insert_update_delete.sql +++ b/tests/test_insert_update_delete.sql @@ -1,3 +1,22 @@ +/** + * This file is a part of the CaosDB Project. + * + * Copyright (C) 2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2023 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/>. + */ USE _caosdb_schema_unit_tests; BEGIN; CALL tap.no_plan(); diff --git a/tests/test_issues.sql b/tests/test_issues.sql index ded706adb4b78b399c6890d2349e285d2b4cacef..ef5abd400387410e18057a5a2281f1d9c391a38d 100644 --- a/tests/test_issues.sql +++ b/tests/test_issues.sql @@ -1,8 +1,9 @@ /** * This file is a part of the CaosDB Project. * - * Copyright (C) 2020 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> * Copyright (C) 2020 Daniel Hornung <d.hornung@indiscale.com> + * Copyright (C) 2023 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 @@ -16,8 +17,6 @@ * * 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 */ USE _caosdb_schema_unit_tests; diff --git a/tests/test_reference_values.sql b/tests/test_reference_values.sql index 34376a8a2e28d5b02b4cb91e239a6cdd32a6fd54..2b9dcefc8f6244f1753185fe86e351c847baa3a2 100644 --- a/tests/test_reference_values.sql +++ b/tests/test_reference_values.sql @@ -1,9 +1,8 @@ /** - * ** header v3.0 * 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> + * Copyright (C) 2020,2023 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2020,2023 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 @@ -17,8 +16,6 @@ * * 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 */ USE _caosdb_schema_unit_tests; diff --git a/utils/update_sql_procedures.sh b/utils/update_sql_procedures.sh index ad57f3c3cb78d423254a75a583d295a8ad823b9b..b9a9e7fe21d1f47b4d7d235ce1a7ac040a060cf3 100755 --- a/utils/update_sql_procedures.sh +++ b/utils/update_sql_procedures.sh @@ -37,8 +37,8 @@ fi source $UTILSPATH/load_settings.sh source $UTILSPATH/helpers.sh +echo -n "updating procedures ... " temp_proc_sql=$(mktemp --suffix=.sql) -echo -n "updating procedures (tmp file: $temp_proc_sql) ..." sed -e "s/db_5_0/$DATABASE_NAME/g" procedures/*.sql procedures/query/*.sql \ > "$temp_proc_sql" mysql_execute_file "$temp_proc_sql"