mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
13 lines
416 B
PHP
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;
|
|
}
|
|
}
|