ctrlpanel/database/migrations/2021_11_05_071456_add_tax_to_paymentlogs.php
2023-01-05 17:03:31 +00:00

37 lines
923 B
PHP

<?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('payments', function (Blueprint $table) {
$table->decimal('tax_value', 8, 2)->after('price')->nullable();
$table->integer('tax_percent')->after('tax_value')->nullable();
$table->decimal('total_price', 8, 2)->after('tax_percent')->nullable();
});
}
/**
* 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');
});
}
};