diff --git a/app/Actions/Hydrate.php b/app/Actions/Hydrate.php index 72013c1..ed8b36f 100644 --- a/app/Actions/Hydrate.php +++ b/app/Actions/Hydrate.php @@ -46,6 +46,7 @@ public static function level(int $id, bool $abort = true): ?Level ]; $lengths = [ + 'plat' => -1, 'tiny' => 0, 'short' => 1, 'medium' => 2, diff --git a/app/Doctrine/TinyInteger.php b/app/Doctrine/TinyInteger.php new file mode 100644 index 0000000..d622b6c --- /dev/null +++ b/app/Doctrine/TinyInteger.php @@ -0,0 +1,54 @@ + env('DB_CONNECTION', 'mysql'), + /* + |-------------------------------------------------------------------------- + | Fucking Hell + |-------------------------------------------------------------------------- + | + | There is no god + | + | https://github.com/laravel/framework/issues/8840 + | + */ + + 'dbal' => [ + 'types' => [ + TinyInteger::NAME => TinyInteger::class, + ], + ], + + /* |-------------------------------------------------------------------------- | Database Connections diff --git a/database/migrations/tenant/0.4.0/2023_12_27_021144_change_levels_22.php b/database/migrations/tenant/0.4.0/2023_12_27_021144_change_levels_22.php new file mode 100644 index 0000000..a6cbc14 --- /dev/null +++ b/database/migrations/tenant/0.4.0/2023_12_27_021144_change_levels_22.php @@ -0,0 +1,31 @@ +tinyInteger('length')->nullable()->change(); + $table->tinyInteger('epic')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('levels', function (Blueprint $table) { + $table->unsignedTinyInteger('length')->nullable()->change(); + $table->boolean('epic')->nullable()->change(); + }); + } +};