2021-11-05 07:45:29 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
2023-01-05 17:03:31 +00:00
|
|
|
return new class extends Migration
|
2021-11-05 07:45:29 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::table('payments', function (Blueprint $table) {
|
2023-01-05 17:01:42 +00:00
|
|
|
$table->decimal('tax_value', 8, 2)->after('price')->nullable();
|
2021-11-05 07:45:29 +00:00
|
|
|
$table->integer('tax_percent')->after('tax_value')->nullable();
|
2023-01-05 17:01:42 +00:00
|
|
|
$table->decimal('total_price', 8, 2)->after('tax_percent')->nullable();
|
2021-11-05 07:45:29 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::table('payments', function (Blueprint $table) {
|
|
|
|
$table->dropColumn('tax_value');
|
|
|
|
$table->dropColumn('tax_percent');
|
|
|
|
$table->dropColumn('total_price');
|
|
|
|
});
|
|
|
|
}
|
2023-01-05 17:03:31 +00:00
|
|
|
};
|