6b982b6730
When migrateDB() upgraded the transactions table to add the 'waste' CHECK constraint, the new table was created WITHOUT the 'undone' column. The migration then tried to build idx_transactions_pid_type_undone, which references 'undone' → PDOException SQLSTATE[HY000]. Fix: - Add undone INTEGER DEFAULT 0 to the migration CREATE TABLE - Replace 'INSERT INTO transactions SELECT * FROM transactions_old' with explicit column list (transactions_old may predate undone column) Fixes: #56