pai-sklep/database/migrations/2021_11_19_075332_admin_field_user.php

33 lines
656 B
PHP
Raw Normal View History

2021-11-20 22:12:35 +01:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AdminFieldUser extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table("users", function (Blueprint $blueprint) {
$blueprint->boolean("admin")->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table("users", function (Blueprint $blueprint) {
$blueprint->dropColumn("admin");
});
}
}