cineflex/database/migrations/2022_11_22_000001_create_permissions_table.php

34 lines
724 B
PHP
Raw Normal View History

2022-11-23 09:32:34 +01:00
<?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::create('permissions', function (Blueprint $table) {
$table->id('permission_id');
$table->timestamps();
$table->addColumn('string', 'permission_name', ['length' => 255]);
$table->unique(['permission_name']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permissions');
}
};