mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Use new shortcuts for migrations
This commit is contained in:
parent
2582174bae
commit
bd6ef05bb1
|
@ -8,19 +8,8 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
use Flarum\Database\Migration;
|
||||
|
||||
return [
|
||||
'up' => function (Builder $schema) {
|
||||
$schema->table('users_discussions', function (Blueprint $table) {
|
||||
$table->enum('subscription', ['follow', 'ignore'])->nullable();
|
||||
});
|
||||
},
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
$schema->table('users_discussions', function (Blueprint $table) {
|
||||
$table->dropColumn('subscription');
|
||||
});
|
||||
}
|
||||
];
|
||||
return Migration::addColumns('users_discussions', [
|
||||
'subscription' => ['enum', 'allowed' => ['follow', 'ignore'], 'nullable' => true]
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user