1
0
mirror of https://github.com/flarum/core.git synced 2025-02-22 10:13:48 +01:00
php-flarum/migrations/2015_02_24_000000_create_permissions_table.php
Toby Zerner b4e5f0e6e5 Simplify permissions and add API to register configurable ones
Lots of thought has gone into this; it will show up later when I do the
admin permissions interface / category permissions :)
2015-05-15 17:05:46 +09:30

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');
}
}