diff --git a/install/includes/import_base_data.php b/install/includes/import_base_data.php index 585f0423..45c803ed 100644 --- a/install/includes/import_base_data.php +++ b/install/includes/import_base_data.php @@ -7,18 +7,6 @@ use MyAAC\Models\ForumBoard; use MyAAC\Models\Gallery; use MyAAC\Models\NewsCategory; -if (NewsCategory::count() === 0) { - $newsCategories = [ - 0, 1, 2, 3, 4 - ]; - - foreach ($newsCategories as $iconId) { - NewsCategory::create([ - 'icon_id' => $iconId, - ]); - } -} - if (Changelog::count() === 0) { Changelog::create([ 'type' => 3, @@ -29,7 +17,6 @@ if (Changelog::count() === 0) { ]); } - if (Config::where('name', 'database_version')->count() === 0) { Config::create([ 'name' => 'database_version', @@ -57,6 +44,18 @@ if (ForumBoard::count() === 0) { } } +if (NewsCategory::count() === 0) { + $newsCategoriesIcons = [ + 0, 1, 2, 3, 4 + ]; + + foreach ($newsCategoriesIcons as $iconId) { + NewsCategory::create([ + 'icon_id' => $iconId, + ]); + } +} + if (Gallery::count() === 0) { Gallery::create([ 'comment' => 'Demon',