From bee375ae8bad3bcf3b6ebffb0e57b40718496bb6 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Tue, 25 Apr 2023 15:25:50 +0300 Subject: [PATCH] MT#57270 Don't wipe sql dump header For sql dump we need to setup some variable like FOREIGN_KEY_CHECKS=0, or NAMES utf8 as well as 'CREATE DATABASE' statement. And we do but then it's wiped due to incorrect redirection '>' instead of '>>'. So fix it. Change-Id: Id37153d5e4ac038f788c34443e1bb5715d5e3985 --- build_utils/ngcp-build-schema-files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_utils/ngcp-build-schema-files b/build_utils/ngcp-build-schema-files index af05c0cc..0840cd87 100755 --- a/build_utils/ngcp-build-schema-files +++ b/build_utils/ngcp-build-schema-files @@ -101,7 +101,7 @@ for schema in "${schemes[@]}"; do mysqldump "${schema}" --compact --skip-extended-insert \ -S "${mariadb_dir}/mysqld.sock" \ | sed -r "s/'[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}'/NOW()/g" \ - > "${schema}.sql" + >> "${schema}.sql" echo "Done" done