From 0e78ed182ddc6174b612c3af8b002369d16bcf16 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Mon, 9 Oct 2023 18:00:53 +0200 Subject: [PATCH] WIP: String IDs --- CHANGELOG.md | 49 +++++++++++++++++ .../create_entity_ids_table.sql | 28 ++++++++++ procedures/deleteEntityProperties.sql | 7 +-- procedures/deleteIsaCache.sql | 4 +- procedures/entityVersioning.sql | 4 +- procedures/getDependentEntities.sql | 5 +- procedures/insertEntity.sql | 4 +- procedures/insertFile.sql | 53 ------------------- procedures/insertIsaCache.sql | 6 +-- procedures/registerSubdomain.sql | 14 ++--- procedures/setFileProperties.sql | 4 +- tests/test_autotap.sql | 12 ++--- tests/test_entity_versioning.sql | 7 +-- tests/test_insert_update_delete.sql | 19 +++++++ tests/test_issues.sql | 5 +- tests/test_reference_values.sql | 7 +-- utils/update_sql_procedures.sh | 2 +- 17 files changed, 130 insertions(+), 100 deletions(-) delete mode 100644 procedures/insertFile.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e41b46..5bc1533 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 7235692..71bc6d3 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 cc9676f..71b5651 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 a792c20..dcfb68c 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 155ab7e..b474d01 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 17ee476..6272fd0 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 54b89ba..4b385f2 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 385f972..0000000 --- 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 f7ed7d8..f08ff61 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 e914f1e..2fc04cc 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 2c2cfc1..e1efa3f 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 acaa896..1ae650e 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 4f8e8fa..f7c52a2 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 20b3a3f..ff1e4ec 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 ded706a..ef5abd4 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 34376a8..2b9dcef 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 ad57f3c..b9a9e7f 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" -- GitLab