fix(restore): surface partial DB-import failures + quote-aware SQL split #292

Merged
jmiller merged 1 commits from fix/restore-silent-sql-import into dev 2026-07-16 16:49:15 +00:00
Owner

Closes #291. Stepped restore silently swallowed failed SQL statements and always reported "Restore complete", hiding a partial/corrupt database import. Now stepDatabase() counts failures and surfaces them (modal shows "Restore Complete (with warnings)" and does not auto-return), the statement splitter is quote/backtick/escape-aware so a ; or newline in a value no longer splits mid-statement, and comment lines are only skipped between statements. Related to #188 (DatabaseImporter) and the standalone MokoRestore splitter, which can follow.

https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i

Closes #291. Stepped restore silently swallowed failed SQL statements and always reported "Restore complete", hiding a partial/corrupt database import. Now stepDatabase() counts failures and surfaces them (modal shows "Restore Complete (with warnings)" and does not auto-return), the statement splitter is quote/backtick/escape-aware so a ; or newline in a value no longer splits mid-statement, and comment lines are only skipped between statements. Related to #188 (DatabaseImporter) and the standalone MokoRestore splitter, which can follow. https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-16 16:49:12 +00:00
Stepped restore silently swallowed every failed SQL statement and always
reported "Restore complete", so a half-imported database looked fine.

- SteppedRestoreEngine::stepDatabase() now records a failure count + first
  few messages (recordSqlError) instead of only error_log(), and the
  completion step returns the count with a warning; the modal shows
  "Restore Complete (with warnings)" and does NOT auto-return.
- New quote/backtick/escape-aware isCompleteStatement() replaces the naive
  "line ends with ;" terminator, so a ; or newline inside a string value no
  longer splits a statement mid-value.
- Comment/blank lines are only skipped BETWEEN statements, never inside an
  accumulating multi-line statement.

Relates to #188 (DatabaseImporter) and the standalone MokoRestore splitter;
tracked in #291.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller force-pushed fix/restore-silent-sql-import from fab64e0828 to 9323de955f 2026-07-16 16:49:12 +00:00 Compare
jmiller merged commit 57e7dd98b1 into dev 2026-07-16 16:49:15 +00:00
jmiller deleted branch fix/restore-silent-sql-import 2026-07-16 16:49:15 +00:00
Sign in to join this conversation.