mirror of
https://github.com/flarum/framework.git
synced 2025-04-28 07:34:03 +08:00
Update migrations
This commit is contained in:
parent
a53e5289f3
commit
015b10e339
@ -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 AddSubscriptionToUsersDiscussionsTable extends Migration
|
class AddSubscriptionToUsersDiscussionsTable extends Migration
|
||||||
{
|
{
|
||||||
@ -12,7 +12,7 @@ class AddSubscriptionToUsersDiscussionsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
app('db')->getSchemaBuilder()->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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -24,7 +24,7 @@ class AddSubscriptionToUsersDiscussionsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
app('db')->getSchemaBuilder()->table('users_discussions', function (Blueprint $table) {
|
$this->schema->table('users_discussions', function (Blueprint $table) {
|
||||||
$table->dropColumn('subscription');
|
$table->dropColumn('subscription');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user