1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00
invoiceninja/database/migrations/2017_08_14_085334_increase_precision.php
2018-01-21 17:42:40 +02:00

43 lines
1006 B
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class IncreasePrecision extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('products', function ($table) {
$table->decimal('cost', 15, 4)->change();
$table->decimal('qty', 15, 4)->default(0)->change();
});
Schema::table('invoice_items', function ($table) {
$table->decimal('cost', 15, 4)->change();
$table->decimal('qty', 15, 4)->default(0)->change();
});
Schema::table('clients', function ($table) {
$table->integer('credit_number_counter')->default(1)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('clients', function ($table) {
$table->dropColumn('credit_number_counter');
});
}
}