diff --git a/config/private-audit.php b/config/private-audit.php index 614d4c2..c0b5c9a 100644 --- a/config/private-audit.php +++ b/config/private-audit.php @@ -1,7 +1,11 @@ false, // Explicit installation transition receipt: tenant => immutable export ID => original SHA-256. - 'legacy_export_transitions' => json_decode(env('COMPRAS_AUDIT_LEGACY_TRANSITIONS', '{}'), true, 32, JSON_THROW_ON_ERROR), + 'legacy_export_transitions' => is_string($legacyTransitions) && $legacyTransitions !== '' + ? json_decode($legacyTransitions, true, 32, JSON_THROW_ON_ERROR) + : [], ]; diff --git a/database/migrations/2026_11_22_000002_allow_incomplete_requisition_drafts.php b/database/migrations/2026_11_22_000002_allow_incomplete_requisition_drafts.php index 7df8ae7..b047f3b 100644 --- a/database/migrations/2026_11_22_000002_allow_incomplete_requisition_drafts.php +++ b/database/migrations/2026_11_22_000002_allow_incomplete_requisition_drafts.php @@ -61,7 +61,8 @@ return new class extends Migration { foreach ($triggers as $name => $sql) { if (! DB::table('sqlite_master')->where('type', 'trigger')->where('name', $name)->exists()) { - DB::unprepared($sql); + // Re-create the trigger exactly as SQLite stored it before the table rebuild. + DB::statement($sql); } } }