2014-12-20 16:56:46 +10:30
|
|
|
<?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($table)
|
|
|
|
{
|
2015-01-04 22:40:16 +03:00
|
|
|
$table->string('grantee', 100);
|
|
|
|
$table->string('entity', 100);
|
|
|
|
$table->string('permission', 100);
|
2014-12-20 16:56:46 +10:30
|
|
|
$table->primary(['grantee', 'entity', 'permission']);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('permissions');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|