mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Use the new migration shortcuts in most of core's migrations
This commit is contained in:
@@ -8,19 +8,14 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Flarum\Database\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return [
|
||||
'up' => function (Builder $schema) {
|
||||
$schema->create('permissions', function (Blueprint $table) {
|
||||
$table->integer('group_id')->unsigned();
|
||||
$table->string('permission', 100);
|
||||
$table->primary(['group_id', 'permission']);
|
||||
});
|
||||
},
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->drop('permissions');
|
||||
return Migration::createTable(
|
||||
'permissions',
|
||||
function (Blueprint $table) {
|
||||
$table->integer('group_id')->unsigned();
|
||||
$table->string('permission', 100);
|
||||
$table->primary(['group_id', 'permission']);
|
||||
}
|
||||
];
|
||||
);
|
||||
|
Reference in New Issue
Block a user