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 fdeeabf..ef76e47 100644 Binary files a/storage/posterg.db and b/storage/posterg.db differ diff --git a/test.db b/test.db new file mode 100644 index 0000000..e69de29