This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
memberdb/database/pending/2015_02_07_172649_create_permissions_table.php

38 lines
858 B
PHP
Raw Permalink Normal View History

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePermissionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('permissions', function (Blueprint $table) {
$table->increments('id');
$table->integer('inherit_id')->unsigned()->nullable()->index();
$table->foreign('inherit_id')->references('id')->on('permissions');
$table->string('name')->index();
$table->string('slug')->index();
$table->text('description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permissions');
}
}