Skip to content

Commit

Permalink
Use new shortcuts for migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Mar 3, 2016
1 parent 33954da commit e9739e9
Showing 1 changed file with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
]);

0 comments on commit e9739e9

Please sign in to comment.