70208d2157
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
37 lines
931 B
PHP
37 lines
931 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class AddTaxToPaymentlogs 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');
|
|
});
|
|
}
|
|
}
|