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

new version

parent d8d3894e
Branches
No related tags found
1 merge request!12DRAFT: ENH: file system: core
Pipeline #18102 failed
...@@ -39,7 +39,10 @@ check_version $OLD_VERSION ...@@ -39,7 +39,10 @@ check_version $OLD_VERSION
mysql_execute_file $PATCH_DIR/patch.sql mysql_execute_file $PATCH_DIR/patch.sql
is_unit_test || mysql_execute "DROP PROCEDURE _create_dirs;"
update_version $NEW_VERSION update_version $NEW_VERSION
success success
...@@ -211,5 +211,5 @@ DELIMITER ; ...@@ -211,5 +211,5 @@ DELIMITER ;
CALL _create_dirs(); CALL _create_dirs();
-- not to be uses after this patch has been applied. -- not to be used after this patch has been applied.
-- DROP PROCEDURE _create_dirs; -- DROP PROCEDURE _create_dirs;
...@@ -43,6 +43,7 @@ BEGIN ...@@ -43,6 +43,7 @@ BEGIN
-- detele file properties -- detele file properties
DELETE FROM files where file_id=EntityID; DELETE FROM files where file_id=EntityID;
DELETE FROM files where parent_directory=EntityID;
-- delete datatype stuff -- delete datatype stuff
DELETE FROM data_type DELETE FROM data_type
......
...@@ -69,3 +69,4 @@ export DATABASE_NAME ...@@ -69,3 +69,4 @@ export DATABASE_NAME
export DATABASE_USER export DATABASE_USER
export DATABASE_USER_PW export DATABASE_USER_PW
export DATABASE_USER_HOST_LIST export DATABASE_USER_HOST_LIST
export IS_UNIT_TEST
...@@ -78,6 +78,7 @@ function _execute_tests () { ...@@ -78,6 +78,7 @@ function _execute_tests () {
# optional parameter: [--fresh] for installing a fresh data base. Otherwise an existing one would be reused. # optional parameter: [--fresh] for installing a fresh data base. Otherwise an existing one would be reused.
function _install_unit_test_database () { function _install_unit_test_database () {
DATABASE_NAME=$UNITTEST_DATABASE DATABASE_NAME=$UNITTEST_DATABASE
IS_UNIT_TEST=1
if [[ $1 = "--fresh" ]] ; then if [[ $1 = "--fresh" ]] ; then
if _db_exists "$DATABASE_NAME"; then if _db_exists "$DATABASE_NAME"; then
drop "$DATABASE_NAME" ; drop "$DATABASE_NAME" ;
......
...@@ -143,4 +143,11 @@ function redo_table { ...@@ -143,4 +143,11 @@ function redo_table {
$MYSQL_CMD $(get_db_args) < ${DATABASE_NAME}.${1}.${OLD_VERSION}.dump.sql $MYSQL_CMD $(get_db_args) < ${DATABASE_NAME}.${1}.${OLD_VERSION}.dump.sql
} }
function is_unit_test {
if [ -z "$IS_UNIT_TEST" ]; then
return 1;
fi
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment