test(form-builder): bump migration step counts for WS-6 v1.3-delta D1 migration

The forward + rollback migration tests pin --step to a fixed count to
walk the WS-5/WS-6 stack back to known pre-states. The new
2026_05_08_000001_add_failure_response_code_to_form_submissions
migration sits at the top of that stack, so both rollback step counts
need +1 to reach the same destinations.

- pre-WS-5a rollback: --step 21 -> 22 (used twice)
- pre-WS-5b rollback (from fully-forward): --step 19 -> 20 (used once)

Comments updated to enumerate the v1.3-delta D1 migration in the WS-6
group.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 01:57:44 +02:00
parent e32de8a0f0
commit 832375b086

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'));