nyx/tests/dynamic_fixtures/migration/laravel/benign.php
2026-06-05 10:16:30 -05:00

13 lines
416 B
PHP

<?php
// Phase 21 — Laravel migration benign control.
// use Illuminate\\Database\\Migrations\\Migration;
class AddUsers {
public function up() {
$col = getenv('NYX_PAYLOAD') ?: 'email';
$safe = strtolower(preg_replace('/[^A-Za-z0-9_]/', '_', $col));
$stmt = "ALTER TABLE users ADD COLUMN " . $safe . " TEXT";
echo "LARAVEL_SQL: " . $stmt . "\n";
return $stmt;
}
}