1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/database/migrations/2017_08_14_085334_increase_precision.php

43 lines
1006 B
PHP
Raw Normal View History

<?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();
});
2017-08-18 11:56:55 +02:00
Schema::table('clients', function ($table) {
$table->integer('credit_number_counter')->default(1)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2017-08-18 11:56:55 +02:00
Schema::table('clients', function ($table) {
$table->dropColumn('credit_number_counter');
});
}
}