From 2ca43fcb2ec0e3d03988b1d41fddd2744c08d0f7 Mon Sep 17 00:00:00 2001 From: IbtissamNoukta Date: Mon, 23 Jan 2023 19:04:26 +0100 Subject: [PATCH] delete quantity from sales table and add it to menu_sale --- ..._181428_drop_quantity_from_sales_table.php | 34 +++++++++++++++++++ ...181733_add_quantity_to_menu_sale_table.php | 34 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 database/migrations/2023_01_22_181428_drop_quantity_from_sales_table.php create mode 100644 database/migrations/2023_01_22_181733_add_quantity_to_menu_sale_table.php diff --git a/database/migrations/2023_01_22_181428_drop_quantity_from_sales_table.php b/database/migrations/2023_01_22_181428_drop_quantity_from_sales_table.php new file mode 100644 index 0000000..208eabb --- /dev/null +++ b/database/migrations/2023_01_22_181428_drop_quantity_from_sales_table.php @@ -0,0 +1,34 @@ +dropColumn("quantity"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('sales', function (Blueprint $table) { + // + $table->integer("quantity"); + }); + } +}; diff --git a/database/migrations/2023_01_22_181733_add_quantity_to_menu_sale_table.php b/database/migrations/2023_01_22_181733_add_quantity_to_menu_sale_table.php new file mode 100644 index 0000000..4215150 --- /dev/null +++ b/database/migrations/2023_01_22_181733_add_quantity_to_menu_sale_table.php @@ -0,0 +1,34 @@ +integer("quantity")->after('sale_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('menu_sale', function (Blueprint $table) { + // + $table->dropColumn("quantity"); + }); + } +};