From 0c504fed4960a21484a8058e807464c59448caf8 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 13 Sep 2023 13:13:41 -0700 Subject: [PATCH 1/2] fixed nullability of on Asset Models --- ...13_fix_asset_model_min_qty_nullability.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php diff --git a/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php b/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php new file mode 100644 index 0000000000..d51827fc3b --- /dev/null +++ b/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php @@ -0,0 +1,32 @@ +integer('min_amt')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('models', function (Blueprint $table) { + $table->integer('min_amt')->default(null)->change(); + }); + } +} From f283a5f755415fc4f56151370c54ffa380f6f666 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 13 Sep 2023 13:24:26 -0700 Subject: [PATCH 2/2] changed the down method change --- .../2023_09_13_200913_fix_asset_model_min_qty_nullability.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php b/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php index d51827fc3b..c3b3d1e0d7 100644 --- a/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php +++ b/database/migrations/2023_09_13_200913_fix_asset_model_min_qty_nullability.php @@ -26,7 +26,7 @@ class FixAssetModelMinQtyNullability extends Migration public function down() { Schema::table('models', function (Blueprint $table) { - $table->integer('min_amt')->default(null)->change(); + $table->integer('min_amt')->nullable(false)->change(); }); } }