ctrlpanel/database/migrations/2021_11_05_071456_add_tax_to_paymentlogs.php

37 lines
923 B
PHP
Raw Permalink Normal View History

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) {
$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();
$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
};