From 4805ecb0fa431a5ef574904e77dbccd601dcac27 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Mon, 3 May 2021 17:51:39 +0200 Subject: [PATCH] evol table products for null product types --- ...2021_05_03_173156_alter_products_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2021_05_03_173156_alter_products_table.php diff --git a/database/migrations/2021_05_03_173156_alter_products_table.php b/database/migrations/2021_05_03_173156_alter_products_table.php new file mode 100644 index 00000000..8a2de7eb --- /dev/null +++ b/database/migrations/2021_05_03_173156_alter_products_table.php @@ -0,0 +1,34 @@ +string('product_type')->default(null)->change(); + $table->string('product_type')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('products', function (Blueprint $table) { + $table->string('product_type')->default('foodProduct')->change(); + $table->string('product_type')->nullable(false)->change(); + }); + } +}