Do not use model classes in the migrations

See 28f43f805c
This commit is contained in:
Franz Liedke 2016-03-20 22:48:18 +09:00
parent eb975802ea
commit a6ecba220a

View File

@ -8,12 +8,12 @@
* file that was distributed with this source code.
*/
use Flarum\Tags\Tag;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
return [
'up' => function (Builder $schema) {
'up' => function (Builder $schema, ConnectionInterface $db) {
$schema->create('tags', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 100);
@ -35,8 +35,7 @@ return [
$table->integer('last_discussion_id')->unsigned()->nullable();
});
Tag::unguard();
Tag::insert([
$db->table('tags')->insert([
'name' => 'General',
'slug' => 'general',
'color' => '#888',