File: /home/imensosw/www/amanda/database/migrations/2020_12_17_072221_add_softdelete_in_orders_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSoftdeleteInOrdersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('orders', function (Blueprint $table) {
DB::statement('ALTER TABLE `orders` CHANGE `deleted_at` `deleted_at` TIMESTAMP(1) NULL DEFAULT NULL;');
//ALTER TABLE `orders` CHANGE `deleted_at` `deleted_at` TIMESTAMP(1) NULL DEFAULT NULL;
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('orders', function (Blueprint $table) {
DB::statement('ALTER TABLE `orders` CHANGE `deleted_at` `deleted_at` INT(1) NOT NULL DEFAULT "0";');
});
}
}