Use new shortcut for default settings migration

This commit is contained in:
Franz Liedke 2016-03-08 00:04:12 +09:00
parent d5f3987cf7
commit fdcf1f12ad

View File

@ -8,20 +8,11 @@
* file that was distributed with this source code.
*/
use Flarum\Settings\SettingsRepositoryInterface;
use Flarum\Database\Migration;
return [
'up' => function (SettingsRepositoryInterface $settings) {
$settings->set('flarum-tags.max_primary_tags', '1');
$settings->set('flarum-tags.min_primary_tags', '1');
$settings->set('flarum-tags.max_secondary_tags', '3');
$settings->set('flarum-tags.min_secondary_tags', '0');
},
'down' => function (SettingsRepositoryInterface $settings) {
$settings->delete('flarum-tags.max_primary_tags');
$settings->delete('flarum-tags.max_secondary_tags');
$settings->delete('flarum-tags.min_primary_tags');
$settings->delete('flarum-tags.min_secondary_tags');
}
];
return Migration::addSettings([
'flarum-tags.max_primary_tags' => '1',
'flarum-tags.min_primary_tags' => '1',
'flarum-tags.max_secondary_tags' => '3',
'flarum-tags.min_secondary_tags' => '0',
]);