mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Increase number of decimals. #506
This commit is contained in:
@@ -89,7 +89,7 @@ class CreateMainTables extends Migration
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('account_type_id', false, true);
|
||||
$table->string('name', 1024);
|
||||
$table->decimal('virtual_balance', 14, 4)->nullable();
|
||||
$table->decimal('virtual_balance', 14, 12)->nullable();
|
||||
$table->string('iban', 255)->nullable();
|
||||
$table->boolean('active')->default(1);
|
||||
$table->boolean('encrypted')->default(0);
|
||||
@@ -160,8 +160,8 @@ class CreateMainTables extends Migration
|
||||
$table->integer('user_id', false, true);
|
||||
$table->string('name', 1024);
|
||||
$table->string('match', 1024);
|
||||
$table->decimal('amount_min', 14, 4);
|
||||
$table->decimal('amount_max', 14, 4);
|
||||
$table->decimal('amount_min', 14, 12);
|
||||
$table->decimal('amount_max', 14, 12);
|
||||
$table->date('date');
|
||||
$table->string('repeat_freq', 30);
|
||||
$table->smallInteger('skip', false, true)->default(0);
|
||||
@@ -205,7 +205,7 @@ class CreateMainTables extends Migration
|
||||
$table->timestamps();
|
||||
$table->integer('budget_id', false, true);
|
||||
$table->date('startdate');
|
||||
$table->decimal('amount', 14, 4);
|
||||
$table->decimal('amount', 14, 12);
|
||||
$table->string('repeat_freq', 30);
|
||||
$table->boolean('repeats')->default(0);
|
||||
$table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade');
|
||||
@@ -221,7 +221,7 @@ class CreateMainTables extends Migration
|
||||
$table->integer('budget_limit_id', false, true);
|
||||
$table->date('startdate');
|
||||
$table->date('enddate');
|
||||
$table->decimal('amount', 14, 4);
|
||||
$table->decimal('amount', 14, 12);
|
||||
$table->foreign('budget_limit_id')->references('id')->on('budget_limits')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
@@ -299,7 +299,7 @@ class CreateMainTables extends Migration
|
||||
$table->softDeletes();
|
||||
$table->integer('account_id', false, true);
|
||||
$table->string('name', 1024);
|
||||
$table->decimal('targetamount', 14, 4);
|
||||
$table->decimal('targetamount', 14, 12);
|
||||
$table->date('startdate')->nullable();
|
||||
$table->date('targetdate')->nullable();
|
||||
$table->integer('order', false, true)->default(0);
|
||||
@@ -318,7 +318,7 @@ class CreateMainTables extends Migration
|
||||
$table->integer('piggy_bank_id', false, true);
|
||||
$table->date('startdate')->nullable();
|
||||
$table->date('targetdate')->nullable();
|
||||
$table->decimal('currentamount', 14, 4);
|
||||
$table->decimal('currentamount', 14, 12);
|
||||
$table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
@@ -579,7 +579,7 @@ class CreateMainTables extends Migration
|
||||
$table->integer('piggy_bank_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true)->nullable();
|
||||
$table->date('date');
|
||||
$table->decimal('amount', 14, 4);
|
||||
$table->decimal('amount', 14, 12);
|
||||
|
||||
$table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade');
|
||||
$table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('set null');
|
||||
@@ -596,7 +596,7 @@ class CreateMainTables extends Migration
|
||||
$table->integer('account_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
$table->string('description', 1024)->nullable();
|
||||
$table->decimal('amount', 14, 4);
|
||||
$table->decimal('amount', 14, 12);
|
||||
|
||||
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
$table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
|
||||
|
@@ -30,7 +30,7 @@ class ChangesForV430 extends Migration
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('transaction_currency_id', false, true);
|
||||
$table->decimal('amount', 14, 4);
|
||||
$table->decimal('amount', 14, 12);
|
||||
$table->date('start_date');
|
||||
$table->date('end_date');
|
||||
|
||||
|
41
database/migrations/2016_12_28_203205_changes_for_v431.php
Normal file
41
database/migrations/2016_12_28_203205_changes_for_v431.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_12_28_203205_changes_for_v431.php
|
||||
* Copyright (c) 2016 thegrumpydictator@gmail.com
|
||||
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV431
|
||||
*/
|
||||
class ChangesForV431 extends Migration
|
||||
{
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table(
|
||||
'transaction_currencies', function (Blueprint $table) {
|
||||
$table->smallInteger('decimal_places',false, true)->default(2);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user