1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Use new shortcuts for migrations

This commit is contained in:
Franz Liedke
2016-03-04 01:11:39 +09:00
parent 861ff6e910
commit af76eff949

View File

@@ -8,19 +8,14 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use Flarum\Database\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
return [ return Migration::createTable(
'up' => function (Builder $schema) { 'posts_likes',
$schema->create('posts_likes', function (Blueprint $table) { function (Blueprint $table) {
$table->integer('post_id')->unsigned(); $table->integer('post_id')->unsigned();
$table->integer('user_id')->unsigned(); $table->integer('user_id')->unsigned();
$table->primary(['post_id', 'user_id']); $table->primary(['post_id', 'user_id']);
});
},
'down' => function (Builder $schema) {
$schema->drop('posts_likes');
} }
]; );