]> BookStack Code Mirror - bookstack/commitdiff
Migrations: Updated with type hints instead of php doc
authorDan Brown <redacted>
Sun, 17 Mar 2024 15:29:09 +0000 (15:29 +0000)
committerDan Brown <redacted>
Sun, 17 Mar 2024 15:29:09 +0000 (15:29 +0000)
Also updated code to properly import used facades.
For #4903

83 files changed:
database/migrations/2014_10_12_000000_create_users_table.php
database/migrations/2014_10_12_100000_create_password_resets_table.php
database/migrations/2015_07_12_114933_create_books_table.php
database/migrations/2015_07_12_190027_create_pages_table.php
database/migrations/2015_07_13_172121_create_images_table.php
database/migrations/2015_07_27_172342_create_chapters_table.php
database/migrations/2015_08_08_200447_add_users_to_entities.php
database/migrations/2015_08_09_093534_create_page_revisions_table.php
database/migrations/2015_08_16_142133_create_activities_table.php
database/migrations/2015_08_29_105422_add_roles_and_permissions.php
database/migrations/2015_08_30_125859_create_settings_table.php
database/migrations/2015_08_31_175240_add_search_indexes.php
database/migrations/2015_09_04_165821_create_social_accounts_table.php
database/migrations/2015_09_05_164707_add_email_confirmation_table.php
database/migrations/2015_11_21_145609_create_views_table.php
database/migrations/2015_11_26_221857_add_entity_indexes.php
database/migrations/2015_12_05_145049_fulltext_weighting.php
database/migrations/2015_12_07_195238_add_image_upload_types.php
database/migrations/2015_12_09_195748_add_user_avatars.php
database/migrations/2016_01_11_210908_add_external_auth_to_users.php
database/migrations/2016_02_25_184030_add_slug_to_revisions.php
database/migrations/2016_02_27_120329_update_permissions_and_roles.php
database/migrations/2016_02_28_084200_add_entity_access_controls.php
database/migrations/2016_03_09_203143_add_page_revision_types.php
database/migrations/2016_03_13_082138_add_page_drafts.php
database/migrations/2016_03_25_123157_add_markdown_support.php
database/migrations/2016_04_09_100730_add_view_permissions_to_roles.php
database/migrations/2016_04_20_192649_create_joint_permissions_table.php
database/migrations/2016_05_06_185215_create_tags_table.php
database/migrations/2016_07_07_181521_add_summary_to_page_revisions.php
database/migrations/2016_09_29_101449_remove_hidden_roles.php
database/migrations/2016_10_09_142037_create_attachments_table.php
database/migrations/2017_01_21_163556_create_cache_table.php
database/migrations/2017_01_21_163602_create_sessions_table.php
database/migrations/2017_03_19_091553_create_search_index_table.php
database/migrations/2017_04_20_185112_add_revision_counts.php
database/migrations/2017_07_02_152834_update_db_encoding_to_ut8mb4.php
database/migrations/2017_08_01_130541_create_comments_table.php
database/migrations/2017_08_29_102650_add_cover_image_display.php
database/migrations/2018_07_15_173514_add_role_external_auth_id.php
database/migrations/2018_08_04_115700_create_bookshelves_table.php
database/migrations/2019_07_07_112515_add_template_support.php
database/migrations/2019_08_17_140214_add_user_invites_table.php
database/migrations/2019_12_29_120917_add_api_auth.php
database/migrations/2020_08_04_111754_drop_joint_permissions_id.php
database/migrations/2020_08_04_131052_remove_role_name_field.php
database/migrations/2020_09_19_094251_add_activity_indexes.php
database/migrations/2020_09_27_210059_add_entity_soft_deletes.php
database/migrations/2020_09_27_210528_create_deletions_table.php
database/migrations/2020_11_07_232321_simplify_activities_table.php
database/migrations/2020_12_30_173528_add_owned_by_field_to_entities.php
database/migrations/2021_01_30_225441_add_settings_type_column.php
database/migrations/2021_03_08_215138_add_user_slug.php
database/migrations/2021_05_15_173110_create_favourites_table.php
database/migrations/2021_06_30_173111_create_mfa_values_table.php
database/migrations/2021_07_03_085038_add_mfa_enforced_to_roles_table.php
database/migrations/2021_08_28_161743_add_export_role_permission.php
database/migrations/2021_09_26_044614_add_activities_ip_column.php
database/migrations/2021_11_26_070438_add_index_for_user_ip.php
database/migrations/2021_12_07_111343_create_webhooks_table.php
database/migrations/2021_12_13_152024_create_jobs_table.php
database/migrations/2021_12_13_152120_create_failed_jobs_table.php
database/migrations/2022_01_03_154041_add_webhooks_timeout_error_columns.php
database/migrations/2022_04_17_101741_add_editor_change_field_and_permission.php
database/migrations/2022_04_25_140741_update_polymorphic_types.php
database/migrations/2022_07_16_170051_drop_joint_permission_type.php
database/migrations/2022_08_17_092941_create_references_table.php
database/migrations/2022_09_02_082910_fix_shelf_cover_image_types.php
database/migrations/2022_10_07_091406_flatten_entity_permissions_table.php
database/migrations/2022_10_08_104202_drop_entity_restricted_field.php
database/migrations/2023_01_24_104625_refactor_joint_permissions_storage.php
database/migrations/2023_01_28_141230_copy_color_settings_for_dark_mode.php
database/migrations/2023_02_20_093655_increase_attachments_path_length.php
database/migrations/2023_02_23_200227_add_updated_at_index_to_pages.php
database/migrations/2023_06_10_071823_remove_guest_user_secondary_roles.php
database/migrations/2023_06_25_181952_remove_bookshelf_create_entity_permissions.php
database/migrations/2023_07_25_124945_add_receive_notifications_role_permissions.php
database/migrations/2023_07_31_104430_create_watches_table.php
database/migrations/2023_08_21_174248_increase_cache_size.php
database/migrations/2023_12_02_104541_add_default_template_to_books.php
database/migrations/2023_12_17_140913_add_description_html_to_entities.php
database/migrations/2024_01_01_104542_add_default_template_to_chapters.php
database/migrations/2024_02_04_141358_add_views_updated_index.php

index 61b73b7f29c7d37cf5990c14ce10e7969abf442a..638394df60936d13a5c6e115742d88c1c1a9f615 100644 (file)
@@ -1,16 +1,17 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('users', function (Blueprint $table) {
             $table->increments('id');
@@ -26,17 +27,15 @@ return new class extends Migration
             'name'       => 'Admin',
             'email'      => '[email protected]',
             'password'   => bcrypt('password'),
-            'created_at' => \Carbon\Carbon::now()->toDateTimeString(),
-            'updated_at' => \Carbon\Carbon::now()->toDateTimeString(),
+            'created_at' => Carbon::now()->toDateTimeString(),
+            'updated_at' => Carbon::now()->toDateTimeString(),
         ]);
     }
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('users');
     }
index f29aff42b8e10cdb75294d6ad39298e0d0c26b6f..f53370009c64f8527ff500b0df42a3ce54c46470 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('password_resets', function (Blueprint $table) {
             $table->string('email')->index();
@@ -21,10 +20,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('password_resets');
     }
index 95916945871e27f367c2e62e4a6ff66176e9f4fd..98d0433650d05f7c75bbb3d2ae3629430b0dbf6a 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('books', function (Blueprint $table) {
             $table->increments('id');
@@ -23,10 +22,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('books');
     }
index d9b266813ba0a6a861ab6221c253149e445ba431..8ef5fc97120a7762b7d44b14c8cab214d2ccee2b 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('pages', function (Blueprint $table) {
             $table->increments('id');
@@ -27,10 +26,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('pages');
     }
index 8814d079e36eddca049b263b98890c549033ce77..ae57fc80da0819916ea9de64123046ac22dbbf7a 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('images', function (Blueprint $table) {
             $table->increments('id');
@@ -22,10 +21,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('images');
     }
index bfccd6fac5ac6c17a47413cdde1c6ad7cdabcde7..fca92429c3d6f2f3b566d27f5d3be953cd7863b6 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('chapters', function (Blueprint $table) {
             $table->increments('id');
@@ -25,10 +24,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('chapters');
     }
index 8acfd360ae53e75b95bbc71dd8243477a3102c34..51dfafc6aa7a7d828ae3cf084b369de4cd2e3989 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->integer('created_by');
@@ -32,10 +31,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->dropColumn('created_by');
index b8264fd29e6202b0efac265fa60ce0be7dea1cfa..af9104edcd3932ad43fb7ff864430d7085c6f7d9 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('page_revisions', function (Blueprint $table) {
             $table->increments('id');
@@ -25,10 +24,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('page_revisions');
     }
index 742a4a40dd143a03451282e4860a9c7c08c63b39..316d52ced9f3d918dbe1865d45045695fef05f73 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('activities', function (Blueprint $table) {
             $table->increments('id');
@@ -26,10 +25,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('activities');
     }
index 517cfaf439d5c84f95f3baa0ced589412e1090b8..a2a8ae9d69f997a17b227fe47460935fb359ec39 100644 (file)
  * @url https://github.com/Zizaco/entrust
  */
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Create table for storing roles
         Schema::create('roles', function (Blueprint $table) {
@@ -71,22 +72,22 @@ return new class extends Migration
             'name'         => 'admin',
             'display_name' => 'Admin',
             'description'  => 'Administrator of the whole application',
-            'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-            'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+            'created_at'   => Carbon::now()->toDateTimeString(),
+            'updated_at'   => Carbon::now()->toDateTimeString(),
         ]);
         $editorId = DB::table('roles')->insertGetId([
             'name'         => 'editor',
             'display_name' => 'Editor',
             'description'  => 'User can edit Books, Chapters & Pages',
-            'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-            'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+            'created_at'   => Carbon::now()->toDateTimeString(),
+            'updated_at'   => Carbon::now()->toDateTimeString(),
         ]);
         $viewerId = DB::table('roles')->insertGetId([
             'name'         => 'viewer',
             'display_name' => 'Viewer',
             'description'  => 'User can view books & their content behind authentication',
-            'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-            'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+            'created_at'   => Carbon::now()->toDateTimeString(),
+            'updated_at'   => Carbon::now()->toDateTimeString(),
         ]);
 
         // Create default CRUD permissions and allocate to admins and editors
@@ -97,8 +98,8 @@ return new class extends Migration
                 $newPermId = DB::table('permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower($op),
                     'display_name' => $op . ' ' . $entity . 's',
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 DB::table('permission_role')->insert([
                     ['permission_id' => $newPermId, 'role_id' => $adminId],
@@ -115,8 +116,8 @@ return new class extends Migration
                 $newPermId = DB::table('permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower($op),
                     'display_name' => $op . ' ' . $entity,
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 DB::table('permission_role')->insert([
                     'permission_id' => $newPermId,
@@ -138,10 +139,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('permission_role');
         Schema::drop('permissions');
index 45c9c08b32db0ecb7e6d7795d19fa77fdc3b26b9..d1273bf099d1433211f074f096b35737882cc189 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('settings', function (Blueprint $table) {
             $table->string('setting_key')->primary()->indexed();
@@ -21,10 +20,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('settings');
     }
index 6097fd13edd71f82c87fc44edfc7892d078f92f4..4e0421e9e95ecce25bf53cca714a341b8bfc8fe1 100644 (file)
@@ -2,13 +2,12 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
     public function up()
     {
@@ -23,10 +22,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         $sm = Schema::getConnection()->getDoctrineSchemaManager();
         $pages = $sm->listTableDetails('pages');
index bea901136284912f400cfad4dfe924a4dd00e879..7a9b1a49655f593a53e3cf563ae5b8daebf7e1e3 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('social_accounts', function (Blueprint $table) {
             $table->increments('id');
@@ -24,10 +23,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('social_accounts');
     }
index a28a5728edb3b91aa9883c782834b77387370990..9e58493c79c25d550be3761d5097f31800f0d1cb 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->boolean('email_confirmed')->default(true);
@@ -26,10 +25,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->dropColumn('email_confirmed');
index bb8c373d88958a4f55784e50d7a0ebb216466b4b..00ccc7ac3178f93f84f0a9608eba986c7ee29b86 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('views', function (Blueprint $table) {
             $table->increments('id');
@@ -24,10 +23,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('views');
     }
index 3203eb8a7fdbb9df3fc572bffe765d01e1182c3a..3f18824477d0a1dcca821ade52f57670ad91a3f6 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('books', function (Blueprint $table) {
             $table->index('slug');
@@ -48,10 +47,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('books', function (Blueprint $table) {
             $table->dropIndex('books_slug_index');
index a18508c4561e1d1129d1802fbfae6cb97c48217d..7f9d2373c5ca505f86f8d953104ffc58c4e2e1d3 100644 (file)
@@ -2,13 +2,12 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
     public function up()
     {
@@ -23,10 +22,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         $sm = Schema::getConnection()->getDoctrineSchemaManager();
         $pages = $sm->listTableDetails('pages');
index c9f9675c713d732866aa34db9f88883b9d7c49e8..ce6e5d6b61a8eaa7749cd5150c3b9874ff97b52d 100644 (file)
@@ -3,15 +3,14 @@
 use BookStack\Uploads\Image;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('images', function (Blueprint $table) {
             $table->string('path', 400);
@@ -27,10 +26,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('images', function (Blueprint $table) {
             $table->dropColumn('type');
index 950526ddc58bf2146e9c66e6e6da9f337e67d1c0..dd8bcf0b49e187d3c237f61d9e8f188448286079 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->integer('image_id')->default(0);
@@ -19,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->dropColumn('image_id');
index ff889d867dfaadbd609beba234edefbc9cd9c602..413a8a29d95a859209104ea21429a0084b0d8e81 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->string('external_auth_id')->index();
@@ -19,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->dropColumn('external_auth_id');
index a083e10b58008e971b12ce1d60c834b269ae7563..86a08f2c8abdcfb0279fd991692d2f1b4760dc1d 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('page_revisions', function (Blueprint $table) {
             $table->string('slug');
@@ -22,10 +21,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('page_revisions', function (Blueprint $table) {
             $table->dropColumn('slug');
index dd62301d6f33ccbabbb9333224fa0e6f542daf8e..c0d86086d92637a32afec36cc7bfb7941ac73104 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
+use Illuminate\Support\Facades\DB;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Get roles with permissions we need to change
         $adminRoleId = DB::table('roles')->where('name', '=', 'admin')->first()->id;
@@ -30,8 +30,8 @@ return new class extends Migration
             $permissionId = DB::table('permissions')->insertGetId([
                 'name'         => $name,
                 'display_name' => $displayName,
-                'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                'created_at'   => Carbon::now()->toDateTimeString(),
+                'updated_at'   => Carbon::now()->toDateTimeString(),
             ]);
             DB::table('permission_role')->insert([
                 'role_id'       => $adminRoleId,
@@ -47,8 +47,8 @@ return new class extends Migration
                 $permissionId = DB::table('permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower(str_replace(' ', '-', $op)),
                     'display_name' => $op . ' ' . $entity . 's',
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 DB::table('permission_role')->insert([
                     'role_id'       => $adminRoleId,
@@ -66,10 +66,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Get roles with permissions we need to change
         $adminRoleId = DB::table('roles')->where('name', '=', 'admin')->first()->id;
@@ -85,8 +83,8 @@ return new class extends Migration
                 $permissionId = DB::table('permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower($op),
                     'display_name' => $op . ' ' . $entity . 's',
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 DB::table('permission_role')->insert([
                     'role_id'       => $adminRoleId,
@@ -103,8 +101,8 @@ return new class extends Migration
                 $permissionId = DB::table('permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower($op),
                     'display_name' => $op . ' ' . $entity,
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 DB::table('permission_role')->insert([
                     'role_id'       => $adminRoleId,
index 7a796e728d234f32edb4f7325e254a8d6d0cd65e..cf8ba5f3027b1b50e479fd7e0c63f1b56f6adf70 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('images', function (Blueprint $table) {
             $table->integer('uploaded_to')->default(0);
@@ -46,10 +45,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('images', function (Blueprint $table) {
             $table->dropColumn('uploaded_to');
index 2fc6304372443f0f8f1700051a11b52ba6d2dc10..566f2fdeb1fc84d692b5852c17214d6ba8bf1194 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('page_revisions', function (Blueprint $table) {
             $table->string('type')->default('version');
@@ -20,10 +19,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('page_revisions', function (Blueprint $table) {
             $table->dropColumn('type');
index ce597963215668b57b6051eee3ba1b31eade480d..a8690513f67c7cc223f85972bdc67e21b6e4138b 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->boolean('draft')->default(false);
@@ -20,10 +19,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->dropColumn('draft');
index a89fc273d7840dda4045cb29ff7d7451fe00207d..f0b42b645e989bfbe62abee8ad352de827f1d36a 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->longText('markdown')->default('');
@@ -23,10 +22,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->dropColumn('markdown');
index 411c240074cfac35acf9227e702a8187c3b6a259..481ac785f284708535536bbec579f2a15fa01fd2 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
+use Illuminate\Support\Facades\DB;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         $currentRoles = DB::table('roles')->get();
 
@@ -21,8 +21,8 @@ return new class extends Migration
                 $permId = DB::table('permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower(str_replace(' ', '-', $op)),
                     'display_name' => $op . ' ' . $entity . 's',
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 // Assign view permission to all current roles
                 foreach ($currentRoles as $role) {
@@ -37,10 +37,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Delete the new view permission
         $entities = ['Book', 'Page', 'Chapter'];
index 745e156bc20334f392a5b5c726ea6029cdb54056..ba9f615e47ee36f25de74b47c4da990ef793e569 100644 (file)
@@ -1,17 +1,18 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Schema;
 use Illuminate\Support\Str;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('joint_permissions', function (Blueprint $table) {
             $table->increments('id');
@@ -48,8 +49,8 @@ return new class extends Migration
             'description'  => 'The role given to public visitors if allowed',
             'system_name'  => 'public',
             'hidden'       => true,
-            'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-            'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+            'created_at'   => Carbon::now()->toDateTimeString(),
+            'updated_at'   => Carbon::now()->toDateTimeString(),
         ];
 
         // Ensure unique name
@@ -79,10 +80,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('joint_permissions');
 
index b065a052f681095670477eb016127c890fac2b65..1be9a389f1cc0dbc80d194b0e071b293277f7343 100644 (file)
@@ -2,15 +2,14 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('tags', function (Blueprint $table) {
             $table->increments('id');
@@ -30,10 +29,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::drop('tags');
     }
index 03942b17a394c39881056782278f7080131adcdf..562e6415f3695c7d0e0e5b45043ad985afdbbba3 100644 (file)
@@ -1,15 +1,14 @@
 <?php
 
 use Illuminate\Database\Migrations\Migration;
+use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('page_revisions', function ($table) {
             $table->string('summary')->nullable();
@@ -18,10 +17,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('page_revisions', function ($table) {
             $table->dropColumn('summary');
index 2f729673ffa32aaf8319f44b2fb46d7d765f76f1..fa0a5fe92700f8c7b1055d5140d840e9a529f850 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Remove the hidden property from roles
         Schema::table('roles', function (Blueprint $table) {
@@ -29,8 +29,8 @@ return new class extends Migration
             'name'            => 'Guest',
             'system_name'     => 'public',
             'email_confirmed' => true,
-            'created_at'      => \Carbon\Carbon::now(),
-            'updated_at'      => \Carbon\Carbon::now(),
+            'created_at'      => Carbon::now(),
+            'updated_at'      => Carbon::now(),
         ]);
 
         // Get the public role
@@ -45,10 +45,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->boolean('hidden')->default(false);
index 41db5723d0a53adb21caef769ab14e85904f467f..278051c8be1bb0db6fd8981facc6a7cbcdd376c1 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('attachments', function (Blueprint $table) {
             $table->increments('id');
@@ -40,8 +40,8 @@ return new class extends Migration
             $permissionId = DB::table('role_permissions')->insertGetId([
                 'name'         => strtolower($entity) . '-' . strtolower(str_replace(' ', '-', $op)),
                 'display_name' => $op . ' ' . $entity . 's',
-                'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                'created_at'   => Carbon::now()->toDateTimeString(),
+                'updated_at'   => Carbon::now()->toDateTimeString(),
             ]);
             DB::table('permission_role')->insert([
                 'role_id'       => $adminRoleId,
@@ -52,10 +52,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('attachments');
 
index abff912f20a2af886318e09b40b1d46a61f58a4d..7c07c0cb8be81783dfa86f22dee4f866d78921d3 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('cache', function (Blueprint $table) {
             $table->string('key')->unique();
@@ -22,10 +20,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('cache');
     }
index c32838a8cc9854ee8c98abdc124d83ce360a4d0c..3f52752c23407e41c7955186669c65d21531d02e 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('sessions', function (Blueprint $table) {
             $table->string('id')->unique();
@@ -25,10 +23,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('sessions');
     }
index 03a63392afd6817d5b1a0ea8b60c8a29b636fea0..72be3ccbe0c7c7dd8636b585e6e405434f5cd4a4 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('search_terms', function (Blueprint $table) {
             $table->increments('id');
@@ -55,10 +53,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // This was removed for v0.24 since these indexes are removed anyway
         // and will cause issues for db engines that don't support such indexes.
index 891ff8e0a1de4ba216c3b82e66815061929c8876..182d95c75975c6ff0c41bac8132ddc3a512f82c8 100644 (file)
@@ -2,16 +2,15 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->integer('revision_count');
@@ -29,10 +28,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->dropColumn('revision_count');
index 7805be700bd9b4fdced028bdb50d7257898ae80f..178cb584f9a5a2b810cfbcc9a015e7abb592d9fc 100644 (file)
@@ -6,8 +6,6 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
     public function up()
     {
@@ -18,8 +16,6 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
     public function down()
     {
index f654ebf6596f39fb13a13f7177b60fcfc2b6d377..d147854761659f7b34bfeb35d35ab82e29459eab 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('comments', function (Blueprint $table) {
             $table->increments('id')->unsigned();
@@ -37,8 +37,8 @@ return new class extends Migration
                 $permissionId = DB::table('role_permissions')->insertGetId([
                     'name'         => strtolower($entity) . '-' . strtolower(str_replace(' ', '-', $op)),
                     'display_name' => $op . ' ' . $entity . 's',
-                    'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                    'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                    'created_at'   => Carbon::now()->toDateTimeString(),
+                    'updated_at'   => Carbon::now()->toDateTimeString(),
                 ]);
                 DB::table('permission_role')->insert([
                     'role_id'       => $adminRoleId,
@@ -50,10 +50,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('comments');
         // Delete comment role permissions
index 5ba3145f2b044a10c8a037237b617629797e4696..0f7b7d82a9ae4d292e5e0abff082e10c2e4f1eaf 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('books', function (Blueprint $table) {
             $table->integer('image_id')->nullable()->default(null);
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('books', function (Blueprint $table) {
             $table->dropColumn('image_id');
index eb2bf91fc837bd5f326857fd33fce51876614a54..58694765655dcf220977c42c87f90a1e6c00c0b7 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->string('external_auth_id', 180)->default('');
@@ -21,10 +19,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->dropColumn('external_auth_id');
index bd3478bc7c8f696a6fb82406cf020f3d0548709d..54ccfb6baea3fb7176de36ab635d3835308dd182 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Support\Facades\DB;
@@ -9,10 +10,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
 
         // Convert the existing entity tables to InnoDB.
@@ -83,8 +82,8 @@ return new class extends Migration
             $permId = DB::table('role_permissions')->insertGetId([
                 'name'         => 'bookshelf-' . $dbOpName,
                 'display_name' => $op . ' ' . 'BookShelves',
-                'created_at'   => \Carbon\Carbon::now()->toDateTimeString(),
-                'updated_at'   => \Carbon\Carbon::now()->toDateTimeString(),
+                'created_at'   => Carbon::now()->toDateTimeString(),
+                'updated_at'   => Carbon::now()->toDateTimeString(),
             ]);
 
             $rowsToInsert = $roleIdsWithBookPermission->filter(function ($roleId) {
@@ -103,10 +102,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Drop created permissions
         $ops = ['bookshelf-create-all', 'bookshelf-create-own', 'bookshelf-delete-all', 'bookshelf-delete-own', 'bookshelf-update-all', 'bookshelf-update-own', 'bookshelf-view-all', 'bookshelf-view-own'];
index 423e02827f5e897e537553c4ba0fa0859ae47b5f..cabde549e83caad156883c838d97f76b5bc51129 100644 (file)
@@ -3,16 +3,15 @@
 use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->boolean('template')->default(false);
@@ -35,10 +34,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->dropColumn('template');
index ce88a28949b652e8893106b06e73b5f8c4eedf45..1ab4c72f8aa496b082de570581a3767728b5e6ab 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('user_invites', function (Blueprint $table) {
             $table->increments('id');
@@ -23,10 +21,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('user_invites');
     }
index 2cf970a8aeeabb6bb3196389a206546884e42c10..99ce8d27c497b5f9462aea522d2b7135ff229cf8 100644 (file)
@@ -3,16 +3,15 @@
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Support\Carbon;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
 
         // Add API tokens table
@@ -42,10 +41,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Remove API tokens table
         Schema::dropIfExists('api_tokens');
index 902d3c227b62fe32d7afa21619e54c3028fd869e..882001cad5a911abcf65f478dec4d9473d90be85 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('joint_permissions', function (Blueprint $table) {
             $table->dropColumn('id');
@@ -21,10 +19,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('joint_permissions', function (Blueprint $table) {
             $table->dropPrimary(['role_id', 'entity_type', 'entity_id', 'action']);
index cd9f64697c7d1e19116b74e00ede45093e670fd9..10800e11fa43f405c0dd41d6ea75d76865285af2 100644 (file)
@@ -9,10 +9,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->dropColumn('name');
@@ -21,10 +19,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->string('name')->index();
index f7f35b62b9a9b6be4c6564a87a63b3e41540cf6a..ca1afb1daa93ff40218490a0ef85968408bbafc0 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->index('key');
@@ -21,10 +19,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->dropIndex('activities_key_index');
index 9cc12acdce39023da891c5221bfab6b6468ea5fa..bc6c3f18f593cb23c3895f4807d21c0bb33151e4 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('bookshelves', function (Blueprint $table) {
             $table->softDeletes();
@@ -29,10 +27,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('bookshelves', function (Blueprint $table) {
             $table->dropSoftDeletes();
index 3b1098175e9ee18e0c7dc648af12301d499c0f26..96c6c0b0dee0e82f0084394b8e50cd54c184badb 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('deletions', function (Blueprint $table) {
             $table->increments('id');
@@ -28,10 +26,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('deletions');
     }
index 6ebe3fad015bc681f9b533d02f9593b085939533..c128a3235f740f448c5bddc1e634f134ae927a0f 100644 (file)
@@ -9,10 +9,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->renameColumn('key', 'type');
@@ -32,10 +30,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         DB::table('activities')
             ->whereNull('entity_id')
index d9fab7f02ddebe306bd789ec0c4dc7721d85d645..965a061d834bd9f58477945be75613b4d3a8f239 100644 (file)
@@ -9,10 +9,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         $tables = ['pages', 'books', 'chapters', 'bookshelves'];
         foreach ($tables as $table) {
@@ -30,10 +28,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         $tables = ['pages', 'books', 'chapters', 'bookshelves'];
         foreach ($tables as $table) {
index 5d83d15f19a969a28108b3d46b6d2a468903653f..367b93a89c88e5089afa83d1fa2e7deb889d257d 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('settings', function (Blueprint $table) {
             $table->string('type', 50)->default('string');
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('settings', function (Blueprint $table) {
             $table->dropColumn('type');
index c0e1313a714a05d46324584ba6fd605547a14f75..af01d66725160a00c7dc6ca912fa568cea681ad6 100644 (file)
@@ -2,6 +2,7 @@
 
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Schema;
 use Illuminate\Support\Str;
 
@@ -9,10 +10,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->string('slug', 180);
@@ -38,10 +37,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('users', function (Blueprint $table) {
             $table->dropColumn('slug');
index cdd7f4f6485670778af02419ff352a1ebd374fe9..73fa1b24be5e756fdbe8c29835ffb5eea6a5f6ca 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('favourites', function (Blueprint $table) {
             $table->increments('id');
@@ -26,10 +24,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('favourites');
     }
index d145bf4ae9ac64e493cf82443ea322de727d17ef..ea45b8ce124ab2f6a15d92ac901c6e5abbcb0211 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('mfa_values', function (Blueprint $table) {
             $table->increments('id');
@@ -24,10 +22,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('mfa_values');
     }
index 8a180f088545a975e38585b7a89c39d5e36c47ab..b8f8b1cff21ca75d6b9fe99e0ae3bf495655134b 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->boolean('mfa_enforced');
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('roles', function (Blueprint $table) {
             $table->dropColumn('mfa_enforced');
index 3bacab20b4ed3a6c811e57ec7b32d93c82e6b1f8..21f45aa0691b28e147dba9c85eed20842acf3ab4 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Create new templates-manage permission and assign to admin role
         $roles = DB::table('roles')->get('id');
@@ -34,10 +32,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Remove content-export permission
         $contentExportPermission = DB::table('role_permissions')
index 5f8a9500276c86c7ceaec46ec97d55293b98970e..6c21f4b2629ea95c8b8c128d524429047dd9bfef 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->string('ip', 45)->after('user_id');
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->dropColumn('ip');
index 564e68a6de0ff626c4e4cf3675323f0155a6757f..9a0171bde112d335586192aa97d242d4313145a8 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->index('ip', 'activities_ip_index');
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('activities', function (Blueprint $table) {
             $table->dropIndex('activities_ip_index');
index 15d4851d68f46ef75f54ef5e599c1ba56e701620..69be2273db07248f868d6900b1fe2da234282244 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('webhooks', function (Blueprint $table) {
             $table->increments('id');
@@ -37,10 +35,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('webhooks');
         Schema::dropIfExists('webhook_tracked_events');
index a786a8910060202665dabbc1d23f6d46696ff3a9..6098d9b123faa67507b3df8902e834ee63825cf8 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('jobs', function (Blueprint $table) {
             $table->bigIncrements('id');
@@ -26,10 +24,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('jobs');
     }
index 17191986b47f67e56c7e34e306ffe1f236501fb6..249da8171acd0816601ccb095c3320393e66dea6 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('failed_jobs', function (Blueprint $table) {
             $table->id();
@@ -26,10 +24,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('failed_jobs');
     }
index cb26fa26aea2676f8c0bbb856fdbc59b39a12053..968568d3362abf26cb8fbc85b4b753825b8d0469 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('webhooks', function (Blueprint $table) {
             $table->unsignedInteger('timeout')->default(3);
@@ -23,10 +21,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('webhooks', function (Blueprint $table) {
             $table->dropColumn('timeout');
index 17ed0fba064e54269c2e7b7bd9b48822fabb2b38..568e26512647774249d092877caa015ba53c588a 100644 (file)
@@ -10,10 +10,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Add the new 'editor' column to the pages table
         Schema::table('pages', function (Blueprint $table) {
@@ -46,10 +44,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Drop the new column from the pages table
         Schema::table('pages', function (Blueprint $table) {
index 2ec45e7d188ecb44810182938fbebd0e5acf5ab7..00e1e0688fc66e3d2ada430a6bedb9fe95da4f1d 100644 (file)
@@ -32,10 +32,8 @@ return new class extends Migration
 
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         foreach ($this->columnsByTable as $table => $column) {
             foreach ($this->changeMap as $oldVal => $newVal) {
@@ -48,10 +46,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         foreach ($this->columnsByTable as $table => $column) {
             foreach ($this->changeMap as $oldVal => $newVal) {
index ac52af2a6d68f6c804b5a0f1deae7d9a865d4580..a05290e8ae8fd54ea6cc7c56358785e7b4c6a7a5 100644 (file)
@@ -9,10 +9,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         DB::table('joint_permissions')
             ->where('action', '!=', 'view')
@@ -27,10 +25,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('joint_permissions', function (Blueprint $table) {
             $table->string('action');
index 4b688c43e88de5bbebdd61e1935c9c38e8e78dc1..e2580289d5e882fcdebfc592f7419f8e12424892 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('references', function (Blueprint $table) {
             $table->id();
@@ -24,10 +22,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('references');
     }
index b8c23671dc1b7b5ecda0c2e58d175b253de91add..aecb4bca397e53f65dd29a7ad1746ff645019f03 100644 (file)
@@ -7,10 +7,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // This updates the 'type' field for images, uploaded as shelf cover images,
         // to be cover_bookshelf instead of cover_book.
@@ -32,10 +30,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         DB::table('images')
             ->where('type', '=', 'cover_bookshelf')
index f1072102f8783b999506c2d5080046139fa4da49..a086796e9f153a0d0d6e42ddd66251938756229a 100644 (file)
@@ -10,10 +10,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Remove entries for non-existing roles (Caused by previous lack of deletion handling)
         $roleIds = DB::table('roles')->pluck('id');
@@ -63,10 +61,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Create old table structure for entity_permissions
         Schema::create('old_entity_permissions', function (Blueprint $table) {
index b2987674d61b58ff018b537516276792a0ad4a69..8e45d9ea51f353378a06359eb83f7245c7df78b5 100644 (file)
@@ -11,10 +11,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Remove entity-permissions on non-restricted entities
         $deleteInactiveEntityPermissions = function (string $table, string $morphClass) {
@@ -61,10 +59,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         // Create restricted columns
         $createRestrictedColumn = fn(Blueprint $table) => $table->boolean('restricted')->index()->default(0);
index 53994c52b57ef5f56f1d63a5ae7ce7c9590011f4..0e25c1d6052955d8dd8efa65edffd2c05453a443 100644 (file)
@@ -10,10 +10,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Truncate before schema changes to avoid performance issues
         // since we'll need to rebuild anyway.
@@ -34,10 +32,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         DB::table('joint_permissions')->truncate();
 
index 5187dabf470b23d7928e4b42470db0db24e635ae..6f137eca70501025d3cf8fbaef5eccd09768748f 100644 (file)
@@ -7,10 +7,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         $colorSettings = [
             'app-color',
@@ -45,10 +43,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         $colorSettings = [
             'app-color-dark',
index f7cb64ce648a90c00be8813730f0281dab429456..b2a81d49e13c21dcde9cf9f6672f625ae893a08d 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('attachments', function (Blueprint $table) {
             $table->text('path')->change();
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('attachments', function (Blueprint $table) {
             $table->string('path')->change();
index 115bbb0c011beab05feefd842fadfc6968639cc6..c3dc3fb0aa70b57b92db9837f3b7ff8a89184889 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->index('updated_at', 'pages_updated_at_index');
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('pages', function (Blueprint $table) {
             $table->dropIndex('pages_updated_at_index');
index 8d04efdd953e875ed1e455c51a5c8d96d66d06f4..05f6be4a1c9ba65166d784f88ba33844740405d2 100644 (file)
@@ -7,10 +7,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         $guestUserId = DB::table('users')
             ->where('system_name', '=', 'public')
@@ -36,8 +34,6 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
     public function down()
     {
index b5dcaee751c27bae829eabd835eed52131c1fcc2..540491d3b38ac3c4b062d413406d3df1100ed3e2 100644 (file)
@@ -7,8 +7,6 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
     public function up()
     {
@@ -20,8 +18,6 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
     public function down()
     {
index 4872e421e64a13843cde5e62f4164a903d55064e..79e45a762fd536b208578fb84f76a2336645ffec 100644 (file)
@@ -2,15 +2,14 @@
 
 use Carbon\Carbon;
 use Illuminate\Database\Migrations\Migration;
+use Illuminate\Support\Facades\DB;
 
 return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         // Create new receive-notifications permission and assign to admin role
         $permissionId = DB::table('role_permissions')->insertGetId([
@@ -29,10 +28,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         $permission = DB::table('role_permissions')
             ->where('name', '=', 'receive-notifications')
index e2a5c20d07d3414901941bd92c1adbe018b9f192..cf2c7f1051b1d97285b9ca75814dad7e7636229e 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::create('watches', function (Blueprint $table) {
             $table->increments('id');
@@ -27,10 +25,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::dropIfExists('watches');
     }
index 865472c2e5dff26f5b1b3042674ae48b6b4655cc..bca7f9fc3de69c6e1b8b87fa6ebeed1c64944cab 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('cache', function (Blueprint $table) {
             $table->mediumText('value')->change();
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('cache', function (Blueprint $table) {
             $table->text('value')->change();
index c23bebc2e63c0d4f3a28c60e393739b64f8c9acc..bfc480a2e22234e855aa6ec098b077ccb3323ed6 100644 (file)
@@ -8,10 +8,8 @@ class AddDefaultTemplateToBooks extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('books', function (Blueprint $table) {
             $table->integer('default_template_id')->nullable()->default(null);
@@ -20,10 +18,8 @@ class AddDefaultTemplateToBooks extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('books', function (Blueprint $table) {
             $table->dropColumn('default_template_id');
index 68c52e81be595cdb2a6da6fc1a7c4fc8d0a51fe7..781197e601de6c68d356ed1df0025900447aed1b 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         $addColumn = fn(Blueprint $table) => $table->text('description_html');
 
@@ -22,10 +20,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         $removeColumn = fn(Blueprint $table) => $table->removeColumn('description_html');
 
index b3a103a0173eedb187442b001d13abba90862421..77df82272a70b4a5141c6c77820a707d31cdaca4 100644 (file)
@@ -8,10 +8,8 @@ class AddDefaultTemplateToChapters extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('chapters', function (Blueprint $table) {
             $table->integer('default_template_id')->nullable()->default(null);
@@ -20,10 +18,8 @@ class AddDefaultTemplateToChapters extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('chapters', function (Blueprint $table) {
             $table->dropColumn('default_template_id');
index a643b3a1e0e7a44b66411eebed163300ccec1dd8..bc753867873a298b67acc40662facf6f2681526f 100644 (file)
@@ -8,10 +8,8 @@ return new class extends Migration
 {
     /**
      * Run the migrations.
-     *
-     * @return void
      */
-    public function up()
+    public function up(): void
     {
         Schema::table('views', function (Blueprint $table) {
             $table->index(['updated_at'], 'views_updated_at_index');
@@ -20,10 +18,8 @@ return new class extends Migration
 
     /**
      * Reverse the migrations.
-     *
-     * @return void
      */
-    public function down()
+    public function down(): void
     {
         Schema::table('views', function (Blueprint $table) {
             $table->dropIndex('views_updated_at_index');