assertTrue(Schema::hasTable($table), "{$table} should exist after migrate:fresh"); } foreach (self::LEGACY_TABLES as $legacy) { $this->assertFalse( Schema::hasTable($legacy), "legacy table {$legacy} should NOT exist after S2a purge" ); } } public function test_drop_legacy_tables_migration_is_one_way(): void { Artisan::call('migrate:fresh'); // Target the S2a drop migration by name so subsequent unrelated // migrations don't shift the step offset. $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('Legacy registration tables cannot be restored'); $path = 'database/migrations/2026_04_20_100000_drop_remaining_legacy_registration_tables.php'; $migration = require base_path($path); $migration->down(); } }