From 9adcf58ae51674385aa4888354d9d9128ffc2c3a Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 3 Mar 2022 20:30:58 -0800 Subject: [PATCH] Added notes migration Signed-off-by: snipe --- ..._03_03_225655_add_notes_to_accessories.php | 34 +++++++++++++++++++ ...2_03_03_225754_add_notes_to_components.php | 34 +++++++++++++++++++ ..._03_03_225824_add_notes_to_consumables.php | 34 +++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 database/migrations/2022_03_03_225655_add_notes_to_accessories.php create mode 100644 database/migrations/2022_03_03_225754_add_notes_to_components.php create mode 100644 database/migrations/2022_03_03_225824_add_notes_to_consumables.php diff --git a/database/migrations/2022_03_03_225655_add_notes_to_accessories.php b/database/migrations/2022_03_03_225655_add_notes_to_accessories.php new file mode 100644 index 0000000000..d6f8fac6f3 --- /dev/null +++ b/database/migrations/2022_03_03_225655_add_notes_to_accessories.php @@ -0,0 +1,34 @@ +text("notes")->nullable()->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('accessories', function (Blueprint $table) { + if (Schema::hasColumn('accessories', 'notes')) { + $table->dropColumn('notes'); + } + }); + } +} diff --git a/database/migrations/2022_03_03_225754_add_notes_to_components.php b/database/migrations/2022_03_03_225754_add_notes_to_components.php new file mode 100644 index 0000000000..2e09930974 --- /dev/null +++ b/database/migrations/2022_03_03_225754_add_notes_to_components.php @@ -0,0 +1,34 @@ +text("notes")->nullable()->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('components', function (Blueprint $table) { + if (Schema::hasColumn('components', 'notes')) { + $table->dropColumn('notes'); + } + }); + } +} diff --git a/database/migrations/2022_03_03_225824_add_notes_to_consumables.php b/database/migrations/2022_03_03_225824_add_notes_to_consumables.php new file mode 100644 index 0000000000..e024d65144 --- /dev/null +++ b/database/migrations/2022_03_03_225824_add_notes_to_consumables.php @@ -0,0 +1,34 @@ +text("notes")->nullable()->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('consumables', function (Blueprint $table) { + if (Schema::hasColumn('consumables', 'notes')) { + $table->dropColumn('notes'); + } + }); + } +}