WS-6 v1.3-delta D1 — Foundation delta (data layer + exception hierarchy) #10

Merged
bert.hausmans merged 9 commits from feat/ws-6-v1.3-delta-d1 into main 2026-05-08 02:32:35 +02:00
Showing only changes of commit 832375b086 - Show all commits

View File

@@ -55,9 +55,10 @@ final class FormFieldBindingMigrationTest extends TestCase
// create-conditional-logic-groups) + 5 WS-5b migrations
// (drop-validation-cols, configs-backfill, create-configs,
// validation-rules-backfill, create-validation-rules) +
// 2 WS-6 migrations (action-failures, apply-status) +
// 2 WS-5a migrations (drop-binding-cols, create-bindings) = 16.
$this->artisan('migrate:rollback', ['--step' => 21])->assertSuccessful();
// WS-6 migrations (action-failures, apply-status, retry-attempts,
// exception-trace, failure-response-code [v1.3-delta D1]) +
// 2 WS-5a migrations (drop-binding-cols, create-bindings).
$this->artisan('migrate:rollback', ['--step' => 22])->assertSuccessful();
$this->assertFalse(Schema::hasTable('form_field_bindings'));
$this->assertTrue(Schema::hasColumn('form_fields', 'binding'));
$this->assertTrue(Schema::hasColumn('form_field_library', 'default_binding'));
@@ -118,8 +119,9 @@ final class FormFieldBindingMigrationTest extends TestCase
public function test_rollback_reconstructs_json_and_drops_table(): void
{
// Walk back the full WS-5d + WS-5c + WS-6 + WS-5b + WS-5a stack (16 migrations).
$this->artisan('migrate:rollback', ['--step' => 21])->assertSuccessful();
// Walk back the full WS-5d + WS-5c + WS-6 (incl. v1.3-delta D1
// failure_response_code) + WS-5b + WS-5a stack.
$this->artisan('migrate:rollback', ['--step' => 22])->assertSuccessful();
[$fieldAId] = $this->seedFieldsWithBindingJson();
[$libAId] = $this->seedLibraryWithBindingJson();
@@ -130,11 +132,12 @@ final class FormFieldBindingMigrationTest extends TestCase
$this->assertSame(5, DB::table('form_field_bindings')->count());
// Step back over WS-5d (3 migrations) + WS-5c (4 migrations) +
// WS-6 (2 migrations) + WS-5b (5 migrations) in one go → restores
// the pre-WS-5b state (conditional-logic, validation-rules, configs
// and options tables gone, validation_rules + options JSON columns
// reappear on source tables; binding contract intact).
$this->artisan('migrate:rollback', ['--step' => 19])->assertSuccessful();
// WS-6 (action-failures, apply-status, retry-attempts, exception-trace,
// failure-response-code [v1.3-delta D1]) + WS-5b (5 migrations) in one
// go → restores the pre-WS-5b state (conditional-logic, validation-rules,
// configs and options tables gone, validation_rules + options JSON
// columns reappear on source tables; binding contract intact).
$this->artisan('migrate:rollback', ['--step' => 20])->assertSuccessful();
$this->assertFalse(Schema::hasTable('form_field_options'));
$this->assertFalse(Schema::hasTable('form_field_conditional_logic_groups'));
$this->assertFalse(Schema::hasTable('form_field_conditional_logic_conditions'));