pixelfed/database/migrations/2022_11_24_065214_add_regis...

37 wiersze
903 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('register_source')->default('web')->nullable()->index();
$table->string('app_register_token')->nullable();
$table->string('app_register_ip')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('register_source');
$table->dropColumn('app_register_token');
$table->dropColumn('app_register_ip');
});
}
};