From 6f04514aa26896e90084ca367e5a6ec38e9f2f78 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Wed, 15 Apr 2026 12:51:31 +0200 Subject: [PATCH] fix: add structural guard for migration 008 in migrate.sh --- scripts/migrate.sh | 6 ++++++ storage/posterg.db | Bin 237568 -> 237568 bytes test.db | 0 3 files changed, 6 insertions(+) create mode 100644 test.db diff --git a/scripts/migrate.sh b/scripts/migrate.sh index 48c34b3..1b1ffc9 100755 --- a/scripts/migrate.sh +++ b/scripts/migrate.sh @@ -52,6 +52,12 @@ already_applied_structurally() { count=$(sqlite3 "$db" "SELECT COUNT(*) FROM sqlite_master WHERE type='index' AND name='idx_theses_pub_year';") [ "$count" -eq 1 ] ;; + 008_formulaire_settings.sql) + # Effect: site_settings table exists + show_contact column on authors + tbl=$(sqlite3 "$db" "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='site_settings';") + col=$(sqlite3 "$db" "SELECT COUNT(*) FROM pragma_table_info('authors') WHERE name='show_contact';") + [ "$tbl" -eq 1 ] && [ "$col" -eq 1 ] + ;; *) # Unknown migration — assume not applied return 1 diff --git a/storage/posterg.db b/storage/posterg.db index fdeeabfad4b66663e809b61e74612d8cfc1d184e..ef76e47a6a7f87d99670f2ab3d6b1b712a38ef24 100644 GIT binary patch delta 172 zcmZoTz}EmoEsQNpTbNlKL^$}G8Te1~&*snMx91n-d&IYmuX$r*HlKwd2eY%Wfq_MQ zT7FS(X-;BhQEGf~YDr0EUV5=!abb>;fsvW6fr+l6se++_m8qeXv4Ivlv#IfPhj?a@ z?dScNO&LWv_+=RQ@A4nwU(DabU&NGFtXk~MrpD79;+aLZ npZ8-nWfWrPw_)JF%YTS}F@Fz#DSs%x&BjJG{_QsL%tssm6>%6` diff --git a/test.db b/test.db new file mode 100644 index 0000000..e69de29