From d9f0d414fc9b24743a8559cf49a7cee0306342f0 Mon Sep 17 00:00:00 2001 From: sindoring Date: Mon, 27 Jul 2026 02:02:53 +0400 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=B8=D0=BC=D0=BF=D0=BE=D1=80=D1=82=D0=B0=20=D0=B1=D0=B4=20?= =?UTF-8?q?=D0=BC=D0=B0=D0=B3=D0=B0=D0=B7=D0=B8=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- import-custom-sql.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/import-custom-sql.sh b/import-custom-sql.sh index ee090af39..ca2fe0370 100644 --- a/import-custom-sql.sh +++ b/import-custom-sql.sh @@ -184,6 +184,16 @@ import_store_sql() { return 0 fi + # Store.sql is a one-time bootstrap, not a repeatable migration. It + # contains UPDATE and DELETE statements that would overwrite values + # maintained in the live store database. The canonical services table is + # created by the initial bootstrap, so its presence also protects + # installations created before this guard was introduced. + if database_exists "store" && table_exists "store" "store_services"; then + log "store database already initialized, skipping one-time Store.sql bootstrap" + return 0 + fi + if ! database_exists "store"; then log "creating database store" mysql_exec "" "CREATE DATABASE IF NOT EXISTS \`store\` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"