clrghouz/database/migrations/2021_06_18_133000_update_users.php

38 lines
798 B
PHP
Raw Permalink Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateUsers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('admin')->nullable();
$table->text('pgp_pubkey')->nullable();
$table->boolean('active')->default(TRUE);
$table->dateTime('last_on')->nullable();
$table->string('alias')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['admin','pgp_pubkey','active','last_on']);
});
}
}