Skip to content

Commit ed62395

Browse files
committed
Formatting
1 parent 7b345a8 commit ed62395

File tree

1 file changed

+46
-47
lines changed

1 file changed

+46
-47
lines changed

database/migrations/2025_05_29_161420_reorder_timeline_config.php

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,63 @@
99
use Illuminate\Database\Migrations\Migration;
1010

1111
return new class() extends Migration {
12-
13-
public const CAT = 'cat';
12+
public const CAT = 'cat';
1413
public const ORDER = 'order';
1514
public const MAX_ORDER = 32767;
1615

1716
public const TIMELINE = 'Mod Timeline';
1817
public const MOD_NSFW = 'Mod NSFW';
1918

20-
/**
21-
* Run the migrations.
22-
*/
23-
public function up(): void
24-
{
25-
DB::table('configs')->where('key', '=', 'hide_nsfw_in_timeline')->update([
26-
self::CAT => self::MOD_NSFW,
27-
self::ORDER => self::MAX_ORDER,
28-
]);
19+
/**
20+
* Run the migrations.
21+
*/
22+
public function up(): void
23+
{
24+
DB::table('configs')->where('key', '=', 'hide_nsfw_in_timeline')->update([
25+
self::CAT => self::MOD_NSFW,
26+
self::ORDER => self::MAX_ORDER,
27+
]);
2928

30-
DB::table('configs')->where('key', '=', 'timeline_page_enabled')->update([ self::ORDER => 1]);
31-
DB::table('configs')->where('key', '=', 'timeline_photos_layout')->update([ self::ORDER => 2, 'details' => '']);
32-
DB::table('configs')->where('key', '=', 'timeline_photos_order')->update([ self::ORDER => 3]);
33-
DB::table('configs')->where('key', '=', 'timeline_photos_pagination_limit')->update([ self::ORDER => 4, 'details' => '']);
34-
DB::table('configs')->where('key', '=', 'timeline_left_border_enabled')->update([ self::ORDER => 5]);
29+
DB::table('configs')->where('key', '=', 'timeline_page_enabled')->update([self::ORDER => 1]);
30+
DB::table('configs')->where('key', '=', 'timeline_photos_layout')->update([self::ORDER => 2, 'details' => '']);
31+
DB::table('configs')->where('key', '=', 'timeline_photos_order')->update([self::ORDER => 3]);
32+
DB::table('configs')->where('key', '=', 'timeline_photos_pagination_limit')->update([self::ORDER => 4, 'details' => '']);
33+
DB::table('configs')->where('key', '=', 'timeline_left_border_enabled')->update([self::ORDER => 5]);
3534

36-
DB::table('configs')->where('key', '=', 'timeline_albums_enabled')->update([ self::ORDER => 6]);
37-
DB::table('configs')->where('key', '=', 'timeline_albums_public')->update([ self::ORDER => 7]);
38-
DB::table('configs')->where('key', '=', 'timeline_albums_granularity')->update([ self::ORDER => 8]);
35+
DB::table('configs')->where('key', '=', 'timeline_albums_enabled')->update([self::ORDER => 6]);
36+
DB::table('configs')->where('key', '=', 'timeline_albums_public')->update([self::ORDER => 7]);
37+
DB::table('configs')->where('key', '=', 'timeline_albums_granularity')->update([self::ORDER => 8]);
3938

40-
DB::table('configs')->where('key', '=', 'timeline_photos_enabled')->update([ self::ORDER => 9]);
41-
DB::table('configs')->where('key', '=', 'timeline_photos_public')->update([ self::ORDER => 10]);
42-
DB::table('configs')->where('key', '=', 'timeline_photos_granularity')->update([ self::ORDER => 11]);
39+
DB::table('configs')->where('key', '=', 'timeline_photos_enabled')->update([self::ORDER => 9]);
40+
DB::table('configs')->where('key', '=', 'timeline_photos_public')->update([self::ORDER => 10]);
41+
DB::table('configs')->where('key', '=', 'timeline_photos_granularity')->update([self::ORDER => 11]);
4342

44-
DB::table('configs')->where('key', '=', 'timeline_album_date_format_year')->update([ self::ORDER => 12]);
45-
DB::table('configs')->where('key', '=', 'timeline_album_date_format_month')->update([ self::ORDER => 13]);
46-
DB::table('configs')->where('key', '=', 'timeline_album_date_format_day')->update([ self::ORDER => 14]);
43+
DB::table('configs')->where('key', '=', 'timeline_album_date_format_year')->update([self::ORDER => 12]);
44+
DB::table('configs')->where('key', '=', 'timeline_album_date_format_month')->update([self::ORDER => 13]);
45+
DB::table('configs')->where('key', '=', 'timeline_album_date_format_day')->update([self::ORDER => 14]);
4746

48-
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_year')->update([ self::ORDER => 15]);
49-
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_month')->update([ self::ORDER => 16]);
50-
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_day')->update([ self::ORDER => 17]);
51-
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_hour')->update([ self::ORDER => 18]);
47+
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_year')->update([self::ORDER => 15]);
48+
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_month')->update([self::ORDER => 16]);
49+
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_day')->update([self::ORDER => 17]);
50+
DB::table('configs')->where('key', '=', 'timeline_photo_date_format_hour')->update([self::ORDER => 18]);
5251

53-
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_year')->update([ self::ORDER => 19, 'is_expert' => true]);
54-
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_month')->update([ self::ORDER => 20, 'is_expert' => true]);
55-
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_day')->update([ self::ORDER => 21, 'is_expert' => true]);
56-
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_hour')->update([ self::ORDER => 22, 'is_expert' => true]);
57-
}
52+
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_year')->update([self::ORDER => 19, 'is_expert' => true]);
53+
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_month')->update([self::ORDER => 20, 'is_expert' => true]);
54+
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_day')->update([self::ORDER => 21, 'is_expert' => true]);
55+
DB::table('configs')->where('key', '=', 'timeline_quick_access_date_format_hour')->update([self::ORDER => 22, 'is_expert' => true]);
56+
}
5857

59-
/**
60-
* Reverse the migrations.
61-
*/
62-
public function down(): void
63-
{
64-
DB::table('configs')->where(self::CAT, '=', self::TIMELINE)->update([
65-
self::ORDER => self::MAX_ORDER,
66-
]);
67-
DB::table('configs')->where('key', '=', 'hide_nsfw_in_timeline')->update([
68-
self::CAT => self::TIMELINE,
69-
self::ORDER => self::MAX_ORDER,
70-
]);
71-
}
58+
/**
59+
* Reverse the migrations.
60+
*/
61+
public function down(): void
62+
{
63+
DB::table('configs')->where(self::CAT, '=', self::TIMELINE)->update([
64+
self::ORDER => self::MAX_ORDER,
65+
]);
66+
DB::table('configs')->where('key', '=', 'hide_nsfw_in_timeline')->update([
67+
self::CAT => self::TIMELINE,
68+
self::ORDER => self::MAX_ORDER,
69+
]);
70+
}
7271
};

0 commit comments

Comments
 (0)