mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 21:43:53 +00:00
Even more code cleanup.
This commit is contained in:
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateUsersTable
|
* Class CreateUsersTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateUsersTable extends Migration {
|
class CreateUsersTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateUsersTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('users', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'users', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->string('email', 100);
|
$table->string('email', 100);
|
||||||
@@ -28,7 +29,8 @@ class CreateUsersTable extends Migration {
|
|||||||
$table->boolean('migrated');
|
$table->boolean('migrated');
|
||||||
|
|
||||||
$table->unique('email');
|
$table->unique('email');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateAccountsTable
|
* Class CreateAccountsTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateAccountsTable extends Migration {
|
class CreateAccountsTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateAccountsTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('accounts', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'accounts', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('user_id')->unsigned();
|
$table->integer('user_id')->unsigned();
|
||||||
@@ -37,7 +38,8 @@ class CreateAccountsTable extends Migration {
|
|||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
|
|
||||||
$table->unique(['user_id', 'account_type_id', 'name']);
|
$table->unique(['user_id', 'account_type_id', 'name']);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateComponentsTable
|
* Class CreateComponentsTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateComponentsTable extends Migration {
|
class CreateComponentsTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateComponentsTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('components', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'components', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->string('name', 50);
|
$table->string('name', 50);
|
||||||
@@ -31,7 +32,8 @@ class CreateComponentsTable extends Migration {
|
|||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
|
|
||||||
$table->unique(['user_id', 'class', 'name']);
|
$table->unique(['user_id', 'class', 'name']);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateTransactionCurrenciesTable
|
* Class CreateTransactionCurrenciesTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateTransactionCurrenciesTable extends Migration {
|
class CreateTransactionCurrenciesTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,12 +18,13 @@ class CreateTransactionCurrenciesTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('transaction_currencies', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'transaction_currencies', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->string('code', 3);
|
$table->string('code', 3);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateTransactionTypesTable
|
* Class CreateTransactionTypesTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateTransactionTypesTable extends Migration {
|
class CreateTransactionTypesTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,12 +18,13 @@ class CreateTransactionTypesTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('transaction_types', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'transaction_types', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->string('type', 50);
|
$table->string('type', 50);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateTransactionJournalsTable
|
* Class CreateTransactionJournalsTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateTransactionJournalsTable extends Migration {
|
class CreateTransactionJournalsTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateTransactionJournalsTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('transaction_journals', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'transaction_journals', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('user_id')->unsigned();
|
$table->integer('user_id')->unsigned();
|
||||||
@@ -42,7 +43,8 @@ class CreateTransactionJournalsTable extends Migration {
|
|||||||
$table->foreign('user_id')
|
$table->foreign('user_id')
|
||||||
->references('id')->on('users')
|
->references('id')->on('users')
|
||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateComponentTransactionTable
|
* Class CreateComponentTransactionTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateComponentTransactionTable extends Migration {
|
class CreateComponentTransactionTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateComponentTransactionTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('component_transaction', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'component_transaction', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('component_id')->unsigned();
|
$table->integer('component_id')->unsigned();
|
||||||
$table->integer('transaction_id')->unsigned();
|
$table->integer('transaction_id')->unsigned();
|
||||||
@@ -32,7 +33,8 @@ class CreateComponentTransactionTable extends Migration {
|
|||||||
$table->foreign('transaction_id')
|
$table->foreign('transaction_id')
|
||||||
->references('id')->on('transactions')
|
->references('id')->on('transactions')
|
||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateRecurringTransactionsTable
|
* Class CreateRecurringTransactionsTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateRecurringTransactionsTable extends Migration {
|
class CreateRecurringTransactionsTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateRecurringTransactionsTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('recurring_transactions', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'recurring_transactions', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('user_id')->unsigned();
|
$table->integer('user_id')->unsigned();
|
||||||
@@ -36,7 +37,8 @@ class CreateRecurringTransactionsTable extends Migration {
|
|||||||
$table->unique(['user_id', 'name']);
|
$table->unique(['user_id', 'name']);
|
||||||
|
|
||||||
|
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateComponentTransactionJournalTable
|
* Class CreateComponentTransactionJournalTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateComponentTransactionJournalTable extends Migration {
|
class CreateComponentTransactionJournalTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateComponentTransactionJournalTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('component_transaction_journal', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'component_transaction_journal', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('component_id')->unsigned();
|
$table->integer('component_id')->unsigned();
|
||||||
$table->integer('transaction_journal_id')->unsigned();
|
$table->integer('transaction_journal_id')->unsigned();
|
||||||
@@ -32,7 +33,8 @@ class CreateComponentTransactionJournalTable extends Migration {
|
|||||||
$table->foreign('transaction_journal_id')
|
$table->foreign('transaction_journal_id')
|
||||||
->references('id')->on('transaction_journals')
|
->references('id')->on('transaction_journals')
|
||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateSessionTable extends Migration {
|
class CreateSessionTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -16,12 +17,13 @@ class CreateSessionTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('sessions', function($t)
|
Schema::create(
|
||||||
{
|
'sessions', function ($t) {
|
||||||
$t->string('id')->unique();
|
$t->string('id')->unique();
|
||||||
$t->text('payload');
|
$t->text('payload');
|
||||||
$t->integer('last_activity');
|
$t->integer('last_activity');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateLimitsTable
|
* Class CreateLimitsTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateLimitsTable extends Migration {
|
class CreateLimitsTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateLimitsTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('limits', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'limits', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('component_id')->unsigned();
|
$table->integer('component_id')->unsigned();
|
||||||
@@ -33,7 +34,8 @@ class CreateLimitsTable extends Migration {
|
|||||||
$table->foreign('component_id')
|
$table->foreign('component_id')
|
||||||
->references('id')->on('components')
|
->references('id')->on('components')
|
||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateLimitRepeatTable
|
* Class CreateLimitRepeatTable
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class CreateLimitRepeatTable extends Migration {
|
class CreateLimitRepeatTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class CreateLimitRepeatTable extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('limit_repetitions', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'limit_repetitions', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('limit_id')->unsigned();
|
$table->integer('limit_id')->unsigned();
|
||||||
@@ -32,7 +33,8 @@ class CreateLimitRepeatTable extends Migration {
|
|||||||
$table->foreign('limit_id')
|
$table->foreign('limit_id')
|
||||||
->references('id')->on('limits')
|
->references('id')->on('limits')
|
||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RecurringTransactionsToComponents
|
* Class RecurringTransactionsToComponents
|
||||||
*
|
*
|
||||||
* @SuppressWarnings(PHPMD.ShortMethodName)
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
||||||
*/
|
*/
|
||||||
class RecurringTransactionsToComponents extends Migration {
|
class RecurringTransactionsToComponents extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -17,8 +18,8 @@ class RecurringTransactionsToComponents extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('component_recurring_transaction', function(Blueprint $table)
|
Schema::create(
|
||||||
{
|
'component_recurring_transaction', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('component_id')->unsigned();
|
$table->integer('component_id')->unsigned();
|
||||||
$table->integer('recurring_transaction_id')->unsigned();
|
$table->integer('recurring_transaction_id')->unsigned();
|
||||||
@@ -33,7 +34,8 @@ class RecurringTransactionsToComponents extends Migration {
|
|||||||
$table->foreign('recurring_transaction_id')
|
$table->foreign('recurring_transaction_id')
|
||||||
->references('id')->on('recurring_transactions')
|
->references('id')->on('recurring_transactions')
|
||||||
->onDelete('cascade');
|
->onDelete('cascade');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,9 +27,6 @@ class Chart implements ChartInterface
|
|||||||
$return = ['name' => $account->name, 'id' => $account->id, 'data' => []];
|
$return = ['name' => $account->name, 'id' => $account->id, 'data' => []];
|
||||||
|
|
||||||
while ($current <= $end) {
|
while ($current <= $end) {
|
||||||
\Log::debug(
|
|
||||||
'Now at day: ' . $current . '(' . $current->timestamp . '), (' . ($current->timestamp * 1000) . ') '
|
|
||||||
);
|
|
||||||
if ($current > $today) {
|
if ($current > $today) {
|
||||||
$return['data'][] = [$current->timestamp * 1000, $account->predict(clone $current)];
|
$return['data'][] = [$current->timestamp * 1000, $account->predict(clone $current)];
|
||||||
} else {
|
} else {
|
||||||
@@ -118,9 +115,6 @@ class Chart implements ChartInterface
|
|||||||
}]
|
}]
|
||||||
)->orderBy('name', 'ASC')->get();
|
)->orderBy('name', 'ASC')->get();
|
||||||
|
|
||||||
$limitInPeriod = 'Envelope for (empty)';
|
|
||||||
$spentInPeriod = 'Spent in (empty)';
|
|
||||||
|
|
||||||
foreach ($budgets as $budget) {
|
foreach ($budgets as $budget) {
|
||||||
$budget->count = 0;
|
$budget->count = 0;
|
||||||
foreach ($budget->limits as $limit) {
|
foreach ($budget->limits as $limit) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Firefly\Helper\Form;
|
namespace Firefly\Helper\Form;
|
||||||
|
|
||||||
use Illuminate\Events\Dispatcher;
|
use Illuminate\Events\Dispatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class FormTrigger
|
* Class FormTrigger
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ class MigrationHelper implements MigrationHelperInterface
|
|||||||
foreach ($this->JSON->components as $entry) {
|
foreach ($this->JSON->components as $entry) {
|
||||||
switch ($entry->type->type) {
|
switch ($entry->type->type) {
|
||||||
case 'beneficiary':
|
case 'beneficiary':
|
||||||
|
/** @noinspection PhpParamsInspection */
|
||||||
$beneficiary = $this->_importBeneficiary($entry, $beneficiaryAT);
|
$beneficiary = $this->_importBeneficiary($entry, $beneficiaryAT);
|
||||||
$this->map['accounts'][$entry->id] = $beneficiary;
|
$this->map['accounts'][$entry->id] = $beneficiary;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ class EloquentAccountRepository implements AccountRepositoryInterface
|
|||||||
}
|
}
|
||||||
$type = \AccountType::where('description', 'Beneficiary account')->first();
|
$type = \AccountType::where('description', 'Beneficiary account')->first();
|
||||||
|
|
||||||
|
/** @noinspection PhpParamsInspection */
|
||||||
|
|
||||||
return $this->createOrFind($name, $type);
|
return $this->createOrFind($name, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ class EloquentTransactionJournalRepository implements TransactionJournalReposito
|
|||||||
|
|
||||||
return $journal;
|
return $journal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $journalId
|
* @param $journalId
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -62,16 +62,6 @@ class Account extends Ardent
|
|||||||
return $this->belongsTo('AccountType');
|
return $this->belongsTo('AccountType');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* User
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
||||||
*/
|
|
||||||
public function user()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('User');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an accounts current balance.
|
* Get an accounts current balance.
|
||||||
*
|
*
|
||||||
@@ -92,16 +82,6 @@ class Account extends Ardent
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Carbon\Carbon $date
|
|
||||||
*
|
|
||||||
* @return null
|
|
||||||
*/
|
|
||||||
public function predict(\Carbon\Carbon $date)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transactions.
|
* Transactions.
|
||||||
*
|
*
|
||||||
@@ -112,4 +92,26 @@ class Account extends Ardent
|
|||||||
return $this->hasMany('Transaction');
|
return $this->hasMany('Transaction');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Carbon\Carbon $date
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public function predict(
|
||||||
|
/** @noinspection PhpUnusedParameterInspection */
|
||||||
|
\Carbon\Carbon $date
|
||||||
|
) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
*/
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('User');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -14,8 +14,10 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
|||||||
*/
|
*/
|
||||||
public function createApplication()
|
public function createApplication()
|
||||||
{
|
{
|
||||||
|
/** @noinspection PhpUnusedLocalVariableInspection */
|
||||||
$unitTesting = true;
|
$unitTesting = true;
|
||||||
|
|
||||||
|
/** @noinspection PhpUnusedLocalVariableInspection */
|
||||||
$testEnvironment = 'testing';
|
$testEnvironment = 'testing';
|
||||||
|
|
||||||
return require __DIR__ . '/../../bootstrap/start.php';
|
return require __DIR__ . '/../../bootstrap/start.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user