mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
fix: add structural guard for migration 008 in migrate.sh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user