From d6bdcf1e96dbb9fb9e0c361aa7e8d517f2807225 Mon Sep 17 00:00:00 2001 From: ScuffedNewt Date: Wed, 28 Aug 2024 11:36:15 +0100 Subject: [PATCH] feat: use migration over artisan call --- README.md | 1 - ...8_28_103434_convert_character_subtypes.php | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2024_08_28_103434_convert_character_subtypes.php diff --git a/README.md b/README.md index a193bd47b5..10164fc104 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,6 @@ Add basic site data: $ php artisan add-site-settings $ php artisan add-text-pages $ php artisan copy-default-images -$ php artisan convert-character-subtype ``` Finally, set up the admin account for logging in: diff --git a/database/migrations/2024_08_28_103434_convert_character_subtypes.php b/database/migrations/2024_08_28_103434_convert_character_subtypes.php new file mode 100644 index 0000000000..4adfcbb8f6 --- /dev/null +++ b/database/migrations/2024_08_28_103434_convert_character_subtypes.php @@ -0,0 +1,33 @@ +call('convert-character-subtype'); + } + + // check call was successful + if (!Schema::hasTable('character_image_subtypes')) { + throw new \Exception('The character_image_subtypes table does not exist.'); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + throw new \Exception('This migration cannot be reversed.'); + } +};