mirror of
https://github.com/flarum/core.git
synced 2025-02-22 10:13:48 +01:00
Lots of thought has gone into this; it will show up later when I do the admin permissions interface / category permissions :)
34 lines
542 B
PHP
34 lines
542 B
PHP
<?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)
|
|
{
|
|
$table->integer('group_id')->unsigned();
|
|
$table->string('permission', 100);
|
|
$table->primary(['group_id', 'permission']);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('permissions');
|
|
}
|
|
|
|
}
|