mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
43 lines
982 B
PHP
43 lines
982 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)->change();
|
|
});
|
|
|
|
Schema::table('invoice_items', function ($table) {
|
|
$table->decimal('cost', 15, 4)->change();
|
|
$table->decimal('qty', 15, 4)->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');
|
|
});
|
|
}
|
|
}
|