25 lines
730 B
PHP
25 lines
730 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
// Beginner protection runs from a start (joining, or a restart after losing every
|
|
// village) for as long as the world's setting says, so the setting stays the one truth.
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::table('players', function (Blueprint $table) {
|
|
$table->renameColumn('protected_until', 'protected_since');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::table('players', function (Blueprint $table) {
|
|
$table->renameColumn('protected_since', 'protected_until');
|
|
});
|
|
}
|
|
};
|