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

Use new migration format

This commit is contained in:
Franz Liedke
2016-02-24 23:13:53 +09:00
parent 0a8718d72a
commit 45b11ece68

View File

@@ -8,24 +8,19 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Flarum\Subscriptions\Migration;
use Flarum\Database\AbstractMigration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
class AddSubscriptionToUsersDiscussionsTable extends AbstractMigration return [
{ 'up' => function (Builder $schema) {
public function up() $schema->table('users_discussions', function (Blueprint $table) {
{
$this->schema->table('users_discussions', function (Blueprint $table) {
$table->enum('subscription', ['follow', 'ignore'])->nullable(); $table->enum('subscription', ['follow', 'ignore'])->nullable();
}); });
} },
public function down() 'down' => function (Builder $schema) {
{ $schema->table('users_discussions', function (Blueprint $table) {
$this->schema->table('users_discussions', function (Blueprint $table) {
$table->dropColumn('subscription'); $table->dropColumn('subscription');
}); });
} }
} ];