1
0
mirror of https://github.com/flarum/core.git synced 2025-07-29 12:40:40 +02:00

Update migrations

This commit is contained in:
Toby Zerner
2015-08-14 12:55:23 +09:30
parent 26ad468778
commit 6606f416af
2 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
<?php <?php
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Flarum\Migrations\Migration;
class CreateMentionsPostsTable extends Migration class CreateMentionsPostsTable extends Migration
{ {
@@ -12,7 +12,7 @@ class CreateMentionsPostsTable extends Migration
*/ */
public function up() public function up()
{ {
Schema::create('mentions_posts', function (Blueprint $table) { $this->schema->create('mentions_posts', function (Blueprint $table) {
$table->integer('post_id')->unsigned(); $table->integer('post_id')->unsigned();
$table->integer('mentions_id')->unsigned(); $table->integer('mentions_id')->unsigned();
$table->primary(['post_id', 'mentions_id']); $table->primary(['post_id', 'mentions_id']);
@@ -26,6 +26,6 @@ class CreateMentionsPostsTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('mentions_posts'); $this->schema->drop('mentions_posts');
} }
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Flarum\Migrations\Migration;
class CreateMentionsUsersTable extends Migration class CreateMentionsUsersTable extends Migration
{ {
@@ -12,7 +12,7 @@ class CreateMentionsUsersTable extends Migration
*/ */
public function up() public function up()
{ {
Schema::create('mentions_users', function (Blueprint $table) { $this->schema->create('mentions_users', function (Blueprint $table) {
$table->integer('post_id')->unsigned(); $table->integer('post_id')->unsigned();
$table->integer('mentions_id')->unsigned(); $table->integer('mentions_id')->unsigned();
$table->primary(['post_id', 'mentions_id']); $table->primary(['post_id', 'mentions_id']);
@@ -26,6 +26,6 @@ class CreateMentionsUsersTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('mentions_users'); $this->schema->drop('mentions_users');
} }
} }