Skip to content

Commit

Permalink
delete quantity from sales table and add it to menu_sale
Browse files Browse the repository at this point in the history
  • Loading branch information
IbtissamNoukta committed Jan 23, 2023
1 parent c6daefc commit 2ca43fc
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('sales', function (Blueprint $table) {
//
$table->dropColumn("quantity");
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('sales', function (Blueprint $table) {
//
$table->integer("quantity");
});
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('menu_sale', function (Blueprint $table) {
//
$table->integer("quantity")->after('sale_id');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('menu_sale', function (Blueprint $table) {
//
$table->dropColumn("quantity");
});
}
};

0 comments on commit 2ca43fc

Please sign in to comment.