mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Apply fixes from StyleCI
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* AccountFactory.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -22,10 +22,9 @@ declare(strict_types=1);
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Account::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(1000, 10000),
|
||||
'user_id' => 1,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* ModelFactory.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -23,10 +23,9 @@ declare(strict_types=1);
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Attachment::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'user_id' => 1,
|
||||
'attachable_id' => 1,
|
||||
@@ -43,7 +42,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\CurrencyExchangeRate::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'user_id' => 1,
|
||||
'from_currency_id' => 1,
|
||||
@@ -57,7 +56,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\TransactionCurrency::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->words(1, true),
|
||||
'code' => 'ABC',
|
||||
@@ -68,7 +67,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\ImportJob::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->numberBetween(1, 100),
|
||||
'user_id' => 1,
|
||||
@@ -89,7 +88,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\TransactionJournal::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(1000, 10000),
|
||||
'user_id' => 1,
|
||||
@@ -111,7 +110,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Bill::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'created_at' => new Carbon,
|
||||
'updated_at' => new Carbon,
|
||||
@@ -131,7 +130,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\PiggyBankRepetition::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(100, 10000),
|
||||
'piggy_bank_id' => $faker->numberBetween(1, 10),
|
||||
@@ -144,7 +143,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\PiggyBank::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(100, 10000),
|
||||
'created_at' => new Carbon,
|
||||
@@ -162,7 +161,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Tag::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->unique()->numberBetween(200, 10000),
|
||||
'user_id' => 1,
|
||||
@@ -174,7 +173,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Category::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->numberBetween(1, 10),
|
||||
'name' => $faker->words(3, true),
|
||||
@@ -184,7 +183,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Budget::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->numberBetween(1, 10),
|
||||
'name' => $faker->words(3, true),
|
||||
@@ -194,7 +193,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\PiggyBankEvent::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->numberBetween(1, 10),
|
||||
'piggy_bank_id' => $faker->numberBetween(1, 10),
|
||||
@@ -207,7 +206,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\BudgetLimit::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'id' => $faker->numberBetween(1, 10),
|
||||
'start_date' => '2017-01-01',
|
||||
@@ -220,7 +219,7 @@ $factory->define(
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\Models\Transaction::class,
|
||||
function (Faker\Generator $faker) {
|
||||
static function (Faker\Generator $faker) {
|
||||
return [
|
||||
'transaction_amount' => (string)$faker->randomFloat(2, -100, 100),
|
||||
'destination_amount' => (string)$faker->randomFloat(2, -100, 100),
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* UserFactory.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -36,11 +36,11 @@ use Faker\Generator as Faker;
|
||||
*/
|
||||
|
||||
$factory->define(
|
||||
FireflyIII\User::class, function (Faker $faker) {
|
||||
return [
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
}
|
||||
FireflyIII\User::class, static function (Faker $faker) {
|
||||
return [
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
}
|
||||
);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_06_16_000000_create_support_tables.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class CreateSupportTables
|
||||
* Class CreateSupportTables.
|
||||
*/
|
||||
class CreateSupportTables extends Migration
|
||||
{
|
||||
@@ -64,15 +64,12 @@ class CreateSupportTables extends Migration
|
||||
$this->createConfigurationTable();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createAccountTypeTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('account_types')) {
|
||||
Schema::create(
|
||||
'account_types',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('type', 50);
|
||||
@@ -89,7 +86,7 @@ class CreateSupportTables extends Migration
|
||||
if (!Schema::hasTable('configuration')) {
|
||||
Schema::create(
|
||||
'configuration',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -101,15 +98,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createCurrencyTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('transaction_currencies')) {
|
||||
Schema::create(
|
||||
'transaction_currencies',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -124,15 +118,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createJobsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('jobs')) {
|
||||
Schema::create(
|
||||
'jobs',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
// straight from Laravel
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
@@ -148,15 +139,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createPasswordTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('password_resets')) {
|
||||
Schema::create(
|
||||
'password_resets',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
// straight from laravel
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
@@ -166,15 +154,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createPermissionRoleTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('permission_role')) {
|
||||
Schema::create(
|
||||
'permission_role',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->integer('permission_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned();
|
||||
|
||||
@@ -187,15 +172,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createPermissionsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('permissions')) {
|
||||
Schema::create(
|
||||
'permissions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('name')->unique();
|
||||
@@ -206,15 +188,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createRolesTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('roles')) {
|
||||
Schema::create(
|
||||
'roles',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('name')->unique();
|
||||
@@ -225,15 +204,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createSessionsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('sessions')) {
|
||||
Schema::create(
|
||||
'sessions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('user_id')->nullable();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
@@ -245,15 +221,12 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createTransactionTypeTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('transaction_types')) {
|
||||
Schema::create(
|
||||
'transaction_types',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_06_16_000001_create_users_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class CreateUsersTable
|
||||
* Class CreateUsersTable.
|
||||
*/
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
@@ -46,7 +46,7 @@ class CreateUsersTable extends Migration
|
||||
if (!Schema::hasTable('users')) {
|
||||
Schema::create(
|
||||
'users',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('email', 255);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_06_16_000002_create_main_tables.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class CreateMainTables
|
||||
* Class CreateMainTables.
|
||||
*/
|
||||
class CreateMainTables extends Migration
|
||||
{
|
||||
@@ -84,15 +84,12 @@ class CreateMainTables extends Migration
|
||||
$this->createTransactionTables();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createAccountTables(): void
|
||||
{
|
||||
if (!Schema::hasTable('accounts')) {
|
||||
Schema::create(
|
||||
'accounts',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -112,7 +109,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('account_meta')) {
|
||||
Schema::create(
|
||||
'account_meta',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('account_id', false, true);
|
||||
@@ -124,15 +121,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createAttachmentsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('attachments')) {
|
||||
Schema::create(
|
||||
'attachments',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -155,15 +149,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createBillsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('bills')) {
|
||||
Schema::create(
|
||||
'bills',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -195,7 +186,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('budgets')) {
|
||||
Schema::create(
|
||||
'budgets',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -210,7 +201,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('budget_limits')) {
|
||||
Schema::create(
|
||||
'budget_limits',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('budget_id', false, true);
|
||||
@@ -225,7 +216,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('limit_repetitions')) {
|
||||
Schema::create(
|
||||
'limit_repetitions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('budget_limit_id', false, true);
|
||||
@@ -238,15 +229,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createCategoriesTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('categories')) {
|
||||
Schema::create(
|
||||
'categories',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -261,15 +249,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createExportJobsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('export_jobs')) {
|
||||
Schema::create(
|
||||
'export_jobs',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('user_id', false, true);
|
||||
@@ -283,7 +268,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('import_jobs')) {
|
||||
Schema::create(
|
||||
'import_jobs',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('user_id')->unsigned();
|
||||
@@ -297,15 +282,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createPiggyBanksTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('piggy_banks')) {
|
||||
Schema::create(
|
||||
'piggy_banks',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -325,7 +307,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('piggy_bank_repetitions')) {
|
||||
Schema::create(
|
||||
'piggy_bank_repetitions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('piggy_bank_id', false, true);
|
||||
@@ -338,15 +320,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createPreferencesTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('preferences')) {
|
||||
Schema::create(
|
||||
'preferences',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('user_id', false, true);
|
||||
@@ -359,15 +338,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createRoleTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('role_user')) {
|
||||
Schema::create(
|
||||
'role_user',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('role_id', false, true);
|
||||
|
||||
@@ -389,7 +365,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('rule_groups')) {
|
||||
Schema::create(
|
||||
'rule_groups',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -407,7 +383,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('rules')) {
|
||||
Schema::create(
|
||||
'rules',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -430,7 +406,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('rule_actions')) {
|
||||
Schema::create(
|
||||
'rule_actions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('rule_id', false, true);
|
||||
@@ -450,7 +426,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('rule_triggers')) {
|
||||
Schema::create(
|
||||
'rule_triggers',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('rule_id', false, true);
|
||||
@@ -469,15 +445,12 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createTagsTable(): void
|
||||
{
|
||||
if (!Schema::hasTable('tags')) {
|
||||
Schema::create(
|
||||
'tags',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -508,7 +481,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('transaction_journals')) {
|
||||
Schema::create(
|
||||
'transaction_journals',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -536,7 +509,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('journal_meta')) {
|
||||
Schema::create(
|
||||
'journal_meta',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -551,7 +524,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('tag_transaction_journal')) {
|
||||
Schema::create(
|
||||
'tag_transaction_journal',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('tag_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -567,7 +540,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('budget_transaction_journal')) {
|
||||
Schema::create(
|
||||
'budget_transaction_journal',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('budget_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -580,7 +553,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('category_transaction_journal')) {
|
||||
Schema::create(
|
||||
'category_transaction_journal',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -593,7 +566,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('piggy_bank_events')) {
|
||||
Schema::create(
|
||||
'piggy_bank_events',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('piggy_bank_id', false, true);
|
||||
@@ -610,7 +583,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('transactions')) {
|
||||
Schema::create(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -628,7 +601,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('budget_transaction')) {
|
||||
Schema::create(
|
||||
'budget_transaction',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('budget_id', false, true);
|
||||
$table->integer('transaction_id', false, true);
|
||||
@@ -642,7 +615,7 @@ class CreateMainTables extends Migration
|
||||
if (!Schema::hasTable('category_transaction')) {
|
||||
Schema::create(
|
||||
'category_transaction',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id', false, true);
|
||||
$table->integer('transaction_id', false, true);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_08_25_091522_changes_for_3101.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesFor3101
|
||||
* Class ChangesFor3101.
|
||||
*/
|
||||
class ChangesFor3101 extends Migration
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_09_12_121359_fix_nullables.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class FixNullables
|
||||
* Class FixNullables.
|
||||
*/
|
||||
class FixNullables extends Migration
|
||||
{
|
||||
@@ -44,14 +44,14 @@ class FixNullables extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'rule_groups',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->text('description')->nullable()->change();
|
||||
}
|
||||
);
|
||||
|
||||
Schema::table(
|
||||
'rules',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->text('description')->nullable()->change();
|
||||
}
|
||||
);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_10_09_150037_expand_transactions_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ExpandTransactionsTable
|
||||
* Class ExpandTransactionsTable.
|
||||
*/
|
||||
class ExpandTransactionsTable extends Migration
|
||||
{
|
||||
@@ -35,7 +35,7 @@ class ExpandTransactionsTable extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('identifier');
|
||||
}
|
||||
);
|
||||
@@ -50,7 +50,7 @@ class ExpandTransactionsTable extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->smallInteger('identifier', false, true)->default(0);
|
||||
}
|
||||
);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_10_22_075804_changes_for_v410.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV410
|
||||
* Class ChangesForV410.
|
||||
*/
|
||||
class ChangesForV410 extends Migration
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class ChangesForV410 extends Migration
|
||||
{
|
||||
Schema::create(
|
||||
'notes',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_11_24_210552_changes_for_v420.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV420
|
||||
* Class ChangesForV420.
|
||||
*/
|
||||
class ChangesForV420 extends Migration
|
||||
{
|
||||
@@ -35,7 +35,7 @@ class ChangesForV420 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'journal_meta',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropSoftDeletes();
|
||||
}
|
||||
);
|
||||
@@ -50,7 +50,7 @@ class ChangesForV420 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'journal_meta',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->softDeletes();
|
||||
}
|
||||
);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_12_22_150431_changes_for_v430.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV430
|
||||
* Class ChangesForV430.
|
||||
*/
|
||||
class ChangesForV430 extends Migration
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class ChangesForV430 extends Migration
|
||||
{
|
||||
Schema::create(
|
||||
'available_budgets',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2016_12_28_203205_changes_for_v431.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV431
|
||||
* Class ChangesForV431.
|
||||
*/
|
||||
class ChangesForV431 extends Migration
|
||||
{
|
||||
@@ -36,13 +36,13 @@ class ChangesForV431 extends Migration
|
||||
// reinstate "repeats" and "repeat_freq".
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->string('repeat_freq', 30)->nullable();
|
||||
}
|
||||
);
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->boolean('repeats')->default(0);
|
||||
}
|
||||
);
|
||||
@@ -50,7 +50,7 @@ class ChangesForV431 extends Migration
|
||||
// change field "start_date" to "startdate"
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->renameColumn('start_date', 'startdate');
|
||||
}
|
||||
);
|
||||
@@ -58,14 +58,14 @@ class ChangesForV431 extends Migration
|
||||
// remove date field "end_date"
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('end_date');
|
||||
}
|
||||
);
|
||||
// remove decimal places
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('decimal_places');
|
||||
}
|
||||
);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2017_04_13_163623_changes_for_v440.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV440
|
||||
* Class ChangesForV440.
|
||||
*/
|
||||
class ChangesForV440 extends Migration
|
||||
{
|
||||
@@ -83,8 +83,8 @@ class ChangesForV440 extends Migration
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('transactions', 'transaction_currency_id')) {
|
||||
$table->integer('transaction_currency_id', false, true)->after('description')->nullable();
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
$table->integer('transaction_currency_id', false, true)->after('description')->nullable();
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2017_06_02_105232_changes_for_v450.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV450
|
||||
* Class ChangesForV450.
|
||||
*/
|
||||
class ChangesForV450 extends Migration
|
||||
{
|
||||
@@ -38,7 +38,6 @@ class ChangesForV450 extends Migration
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('foreign_amount');
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -70,7 +69,7 @@ class ChangesForV450 extends Migration
|
||||
// add "foreign_amount" to transactions
|
||||
Schema::table(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->decimal('foreign_amount', 22, 12)->nullable()->after('amount');
|
||||
}
|
||||
);
|
||||
@@ -78,7 +77,7 @@ class ChangesForV450 extends Migration
|
||||
// add foreign transaction currency id to transactions (is nullable):
|
||||
Schema::table(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->integer('foreign_currency_id', false, true)->default(null)->after('foreign_amount')->nullable();
|
||||
$table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2017_08_20_062014_changes_for_v470.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -25,7 +25,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class ChangesForV470
|
||||
* Class ChangesForV470.
|
||||
*/
|
||||
class ChangesForV470 extends Migration
|
||||
{
|
||||
@@ -48,7 +48,7 @@ class ChangesForV470 extends Migration
|
||||
if (!Schema::hasTable('link_types')) {
|
||||
Schema::create(
|
||||
'link_types',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -65,7 +65,7 @@ class ChangesForV470 extends Migration
|
||||
if (!Schema::hasTable('journal_links')) {
|
||||
Schema::create(
|
||||
'journal_links',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('link_type_id', false, true);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2017_11_04_170844_changes_for_v470a.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -25,7 +25,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class ChangesForV470a
|
||||
* Class ChangesForV470a.
|
||||
*/
|
||||
class ChangesForV470a extends Migration
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class ChangesForV470a extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('reconciled');
|
||||
}
|
||||
);
|
||||
@@ -51,7 +51,7 @@ class ChangesForV470a extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'transactions',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->boolean('reconciled')->after('deleted_at')->default(0);
|
||||
}
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_01_01_000001_create_oauth_auth_codes_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class CreateOauthAuthCodesTable
|
||||
* Class CreateOauthAuthCodesTable.
|
||||
*/
|
||||
class CreateOauthAuthCodesTable extends Migration
|
||||
{
|
||||
@@ -46,14 +46,14 @@ class CreateOauthAuthCodesTable extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'oauth_auth_codes', function (Blueprint $table) {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->integer('user_id');
|
||||
$table->integer('client_id');
|
||||
$table->text('scopes')->nullable();
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
}
|
||||
'oauth_auth_codes', static function (Blueprint $table) {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->integer('user_id');
|
||||
$table->integer('client_id');
|
||||
$table->text('scopes')->nullable();
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_01_01_000002_create_oauth_access_tokens_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class CreateOauthAccessTokensTable
|
||||
* Class CreateOauthAccessTokensTable.
|
||||
*/
|
||||
class CreateOauthAccessTokensTable extends Migration
|
||||
{
|
||||
@@ -46,16 +46,16 @@ class CreateOauthAccessTokensTable extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'oauth_access_tokens', function (Blueprint $table) {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->integer('user_id')->index()->nullable();
|
||||
$table->integer('client_id');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('scopes')->nullable();
|
||||
$table->boolean('revoked');
|
||||
$table->timestamps();
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
}
|
||||
'oauth_access_tokens', static function (Blueprint $table) {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->integer('user_id')->index()->nullable();
|
||||
$table->integer('client_id');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('scopes')->nullable();
|
||||
$table->boolean('revoked');
|
||||
$table->timestamps();
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_01_01_000003_create_oauth_refresh_tokens_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class CreateOauthRefreshTokensTable
|
||||
* Class CreateOauthRefreshTokensTable.
|
||||
*/
|
||||
class CreateOauthRefreshTokensTable extends Migration
|
||||
{
|
||||
@@ -46,12 +46,12 @@ class CreateOauthRefreshTokensTable extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'oauth_refresh_tokens', function (Blueprint $table) {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->string('access_token_id', 100)->index();
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
}
|
||||
'oauth_refresh_tokens', static function (Blueprint $table) {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->string('access_token_id', 100)->index();
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_01_01_000004_create_oauth_clients_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class CreateOauthClientsTable
|
||||
* Class CreateOauthClientsTable.
|
||||
*/
|
||||
class CreateOauthClientsTable extends Migration
|
||||
{
|
||||
@@ -46,17 +46,17 @@ class CreateOauthClientsTable extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'oauth_clients', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->index()->nullable();
|
||||
$table->string('name');
|
||||
$table->string('secret', 100);
|
||||
$table->text('redirect');
|
||||
$table->boolean('personal_access_client');
|
||||
$table->boolean('password_client');
|
||||
$table->boolean('revoked');
|
||||
$table->timestamps();
|
||||
}
|
||||
'oauth_clients', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->index()->nullable();
|
||||
$table->string('name');
|
||||
$table->string('secret', 100);
|
||||
$table->text('redirect');
|
||||
$table->boolean('personal_access_client');
|
||||
$table->boolean('password_client');
|
||||
$table->boolean('revoked');
|
||||
$table->timestamps();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_01_01_000005_create_oauth_personal_access_clients_table.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class CreateOauthPersonalAccessClientsTable
|
||||
* Class CreateOauthPersonalAccessClientsTable.
|
||||
*/
|
||||
class CreateOauthPersonalAccessClientsTable extends Migration
|
||||
{
|
||||
@@ -37,7 +37,6 @@ class CreateOauthPersonalAccessClientsTable extends Migration
|
||||
public function down(): void
|
||||
{
|
||||
Schema::drop('oauth_personal_access_clients');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,11 +46,11 @@ class CreateOauthPersonalAccessClientsTable extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'oauth_personal_access_clients', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('client_id')->index();
|
||||
$table->timestamps();
|
||||
}
|
||||
'oauth_personal_access_clients', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('client_id')->index();
|
||||
$table->timestamps();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_03_19_141348_changes_for_v472.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -26,7 +26,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV472
|
||||
* Class ChangesForV472.
|
||||
*/
|
||||
class ChangesForV472 extends Migration
|
||||
{
|
||||
@@ -39,13 +39,13 @@ class ChangesForV472 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'attachments',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->text('notes')->nullable();
|
||||
}
|
||||
);
|
||||
Schema::table(
|
||||
'budgets',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('order');
|
||||
}
|
||||
);
|
||||
@@ -61,14 +61,14 @@ class ChangesForV472 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'attachments',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('notes');
|
||||
}
|
||||
);
|
||||
|
||||
Schema::table(
|
||||
'budgets',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->mediumInteger('order', false, true)->default(0);
|
||||
}
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_04_07_210913_changes_for_v473.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class ChangesForV473
|
||||
* Class ChangesForV473.
|
||||
*/
|
||||
class ChangesForV473 extends Migration
|
||||
{
|
||||
@@ -40,7 +40,7 @@ class ChangesForV473 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'bills',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
@@ -50,10 +50,9 @@ class ChangesForV473 extends Migration
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Schema::table(
|
||||
'rules',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('strict');
|
||||
}
|
||||
);
|
||||
@@ -69,14 +68,14 @@ class ChangesForV473 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'bills',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->integer('transaction_currency_id', false, true)->nullable()->after('user_id');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
}
|
||||
);
|
||||
Schema::table(
|
||||
'rules',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->boolean('strict')->default(true);
|
||||
}
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_04_29_174524_changes_for_v474.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -26,7 +26,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV474
|
||||
* Class ChangesForV474.
|
||||
*/
|
||||
class ChangesForV474 extends Migration
|
||||
{
|
||||
@@ -54,7 +54,6 @@ class ChangesForV474 extends Migration
|
||||
'import_jobs',
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('provider');
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -62,7 +61,6 @@ class ChangesForV474 extends Migration
|
||||
'import_jobs',
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('stage');
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -70,7 +68,6 @@ class ChangesForV474 extends Migration
|
||||
'import_jobs',
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('transactions');
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -78,7 +75,6 @@ class ChangesForV474 extends Migration
|
||||
'import_jobs',
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('errors');
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -86,7 +82,6 @@ class ChangesForV474 extends Migration
|
||||
'import_jobs',
|
||||
static function (Blueprint $table) {
|
||||
$table->dropColumn('tag_id');
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_06_08_200526_changes_for_v475.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -26,8 +26,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
*
|
||||
* Class ChangesForV475
|
||||
* Class ChangesForV475.
|
||||
*/
|
||||
class ChangesForV475 extends Migration
|
||||
{
|
||||
@@ -55,97 +54,93 @@ class ChangesForV475 extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create(
|
||||
'recurrences', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('transaction_type_id', false, true);
|
||||
'recurrences', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('transaction_type_id', false, true);
|
||||
|
||||
$table->string('title', 1024);
|
||||
$table->text('description');
|
||||
$table->string('title', 1024);
|
||||
$table->text('description');
|
||||
|
||||
$table->date('first_date');
|
||||
$table->date('repeat_until')->nullable();
|
||||
$table->date('latest_date')->nullable();
|
||||
$table->smallInteger('repetitions', false, true);
|
||||
$table->date('first_date');
|
||||
$table->date('repeat_until')->nullable();
|
||||
$table->date('latest_date')->nullable();
|
||||
$table->smallInteger('repetitions', false, true);
|
||||
|
||||
$table->boolean('apply_rules')->default(true);
|
||||
$table->boolean('active')->default(true);
|
||||
$table->boolean('apply_rules')->default(true);
|
||||
$table->boolean('active')->default(true);
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->foreign('transaction_type_id')->references('id')->on('transaction_types')->onDelete('cascade');
|
||||
}
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->foreign('transaction_type_id')->references('id')->on('transaction_types')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
|
||||
Schema::create(
|
||||
'recurrences_transactions', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('recurrence_id', false, true);
|
||||
$table->integer('transaction_currency_id', false, true);
|
||||
$table->integer('foreign_currency_id', false, true)->nullable();
|
||||
$table->integer('source_id', false, true);
|
||||
$table->integer('destination_id', false, true);
|
||||
'recurrences_transactions', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('recurrence_id', false, true);
|
||||
$table->integer('transaction_currency_id', false, true);
|
||||
$table->integer('foreign_currency_id', false, true)->nullable();
|
||||
$table->integer('source_id', false, true);
|
||||
$table->integer('destination_id', false, true);
|
||||
|
||||
$table->decimal('amount', 22, 12);
|
||||
$table->decimal('foreign_amount', 22, 12)->nullable();
|
||||
$table->string('description', 1024);
|
||||
$table->decimal('amount', 22, 12);
|
||||
$table->decimal('foreign_amount', 22, 12)->nullable();
|
||||
$table->string('description', 1024);
|
||||
|
||||
|
||||
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
|
||||
$table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
$table->foreign('source_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
$table->foreign('destination_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Schema::create(
|
||||
'recurrences_repetitions', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('recurrence_id', false, true);
|
||||
$table->string('repetition_type', 50);
|
||||
$table->string('repetition_moment', 50);
|
||||
$table->smallInteger('repetition_skip', false, true);
|
||||
$table->smallInteger('weekend', false, true);
|
||||
|
||||
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
|
||||
}
|
||||
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
|
||||
$table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
$table->foreign('source_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
$table->foreign('destination_id')->references('id')->on('accounts')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
|
||||
Schema::create(
|
||||
'recurrences_meta', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('recurrence_id', false, true);
|
||||
'recurrences_repetitions', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('recurrence_id', false, true);
|
||||
$table->string('repetition_type', 50);
|
||||
$table->string('repetition_moment', 50);
|
||||
$table->smallInteger('repetition_skip', false, true);
|
||||
$table->smallInteger('weekend', false, true);
|
||||
|
||||
$table->string('name', 50);
|
||||
$table->text('value');
|
||||
|
||||
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
|
||||
}
|
||||
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
|
||||
Schema::create(
|
||||
'rt_meta', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('rt_id', false, true);
|
||||
'recurrences_meta', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('recurrence_id', false, true);
|
||||
|
||||
$table->string('name', 50);
|
||||
$table->text('value');
|
||||
$table->string('name', 50);
|
||||
$table->text('value');
|
||||
|
||||
$table->foreign('rt_id')->references('id')->on('recurrences_transactions')->onDelete('cascade');
|
||||
}
|
||||
$table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
|
||||
Schema::create(
|
||||
'rt_meta', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('rt_id', false, true);
|
||||
|
||||
$table->string('name', 50);
|
||||
$table->text('value');
|
||||
|
||||
$table->foreign('rt_id')->references('id')->on('recurrences_transactions')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_09_05_195147_changes_for_v477.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -26,8 +26,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
*
|
||||
* Class ChangesForV477
|
||||
* Class ChangesForV477.
|
||||
*/
|
||||
class ChangesForV477 extends Migration
|
||||
{
|
||||
@@ -39,15 +38,15 @@ class ChangesForV477 extends Migration
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table(
|
||||
'budget_limits', function (Blueprint $table) {
|
||||
'budget_limits', static function (Blueprint $table) {
|
||||
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('budget_limits_transaction_currency_id_foreign');
|
||||
}
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('budget_limits_transaction_currency_id_foreign');
|
||||
}
|
||||
|
||||
$table->dropColumn(['transaction_currency_id']);
|
||||
}
|
||||
$table->dropColumn(['transaction_currency_id']);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ class ChangesForV477 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->integer('transaction_currency_id', false, true)->nullable()->after('budget_id');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2018_11_06_172532_changes_for_v479.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -26,7 +26,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV479
|
||||
* Class ChangesForV479.
|
||||
*/
|
||||
class ChangesForV479 extends Migration
|
||||
{
|
||||
@@ -38,9 +38,9 @@ class ChangesForV479 extends Migration
|
||||
public function down()
|
||||
{
|
||||
Schema::table(
|
||||
'transaction_currencies', function (Blueprint $table) {
|
||||
$table->dropColumn(['enabled']);
|
||||
}
|
||||
'transaction_currencies', static function (Blueprint $table) {
|
||||
$table->dropColumn(['enabled']);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class ChangesForV479 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->boolean('enabled')->default(0)->after('deleted_at');
|
||||
}
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2019_01_28_193833_changes_for_v4710.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -49,23 +49,22 @@ class ChangesForV4710 extends Migration
|
||||
{
|
||||
if (!Schema::hasTable('transaction_groups')) {
|
||||
Schema::create(
|
||||
'transaction_groups', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->string('title', 1024)->nullable();
|
||||
'transaction_groups', static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->string('title', 1024)->nullable();
|
||||
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
}
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (!Schema::hasTable('group_journals')) {
|
||||
Schema::create(
|
||||
'group_journals',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('transaction_group_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -78,6 +77,5 @@ class ChangesForV4710 extends Migration
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2019_02_05_055516_changes_for_v4711.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -55,15 +55,15 @@ class ChangesForV4711 extends Migration
|
||||
* nice.
|
||||
*/
|
||||
Schema::table(
|
||||
'transaction_journals', function (Blueprint $table) {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
'transaction_journals', static function (Blueprint $table) {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
);
|
||||
|
||||
Schema::table(
|
||||
'preferences', function (Blueprint $table) {
|
||||
$table->text('data')->nullable()->change();
|
||||
}
|
||||
'preferences', static function (Blueprint $table) {
|
||||
$table->text('data')->nullable()->change();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019_02_11_170529_changes_for_v4712.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -26,7 +26,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class ChangesForV4712
|
||||
* Class ChangesForV4712.
|
||||
*/
|
||||
class ChangesForV4712 extends Migration
|
||||
{
|
||||
@@ -57,9 +57,9 @@ class ChangesForV4712 extends Migration
|
||||
* nice.
|
||||
*/
|
||||
Schema::table(
|
||||
'transaction_journals', function (Blueprint $table) {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
'transaction_journals', static function (Blueprint $table) {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019_03_11_223700_fix_ldap_configuration.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -21,13 +21,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class FixLdapConfiguration
|
||||
* Class FixLdapConfiguration.
|
||||
*/
|
||||
class FixLdapConfiguration extends Migration
|
||||
{
|
||||
@@ -39,9 +38,9 @@ class FixLdapConfiguration extends Migration
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table(
|
||||
'users', function (Blueprint $table) {
|
||||
$table->dropColumn(['objectguid']);
|
||||
}
|
||||
'users', static function (Blueprint $table) {
|
||||
$table->dropColumn(['objectguid']);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,9 +57,9 @@ class FixLdapConfiguration extends Migration
|
||||
* now. To support this, we add the column.
|
||||
*/
|
||||
Schema::table(
|
||||
'users', function (Blueprint $table) {
|
||||
$table->uuid('objectguid')->nullable()->after('id');
|
||||
}
|
||||
'users', static function (Blueprint $table) {
|
||||
$table->uuid('objectguid')->nullable()->after('id');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* 2019_03_22_183214_changes_for_v480.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -21,12 +21,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV480
|
||||
* Class ChangesForV480.
|
||||
*/
|
||||
class ChangesForV480 extends Migration
|
||||
{
|
||||
@@ -39,7 +38,7 @@ class ChangesForV480 extends Migration
|
||||
{
|
||||
Schema::table(
|
||||
'transaction_journals',
|
||||
function (Blueprint $table) {
|
||||
static function (Blueprint $table) {
|
||||
// drop transaction_group_id + foreign key.
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
@@ -50,14 +49,14 @@ class ChangesForV480 extends Migration
|
||||
);
|
||||
Schema::table(
|
||||
'rule_groups', static function (Blueprint $table) {
|
||||
$table->dropColumn('stop_processing');
|
||||
}
|
||||
$table->dropColumn('stop_processing');
|
||||
}
|
||||
);
|
||||
|
||||
Schema::table(
|
||||
'users', static function (Blueprint $table) {
|
||||
$table->dropColumn('mfa_secret');
|
||||
}
|
||||
$table->dropColumn('mfa_secret');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,11 +68,9 @@ class ChangesForV480 extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
|
||||
Schema::table(
|
||||
'transaction_journals',
|
||||
static function (Blueprint $table) {
|
||||
|
||||
$table->integer('transaction_currency_id', false, true)->nullable()->change();
|
||||
|
||||
// add column "group_id" after "transaction_type_id"
|
||||
@@ -86,13 +83,13 @@ class ChangesForV480 extends Migration
|
||||
);
|
||||
Schema::table(
|
||||
'rule_groups', static function (Blueprint $table) {
|
||||
$table->boolean('stop_processing')->default(false);
|
||||
}
|
||||
$table->boolean('stop_processing')->default(false);
|
||||
}
|
||||
);
|
||||
Schema::table(
|
||||
'users', static function (Blueprint $table) {
|
||||
$table->string('mfa_secret', 50)->nullable();
|
||||
}
|
||||
$table->string('mfa_secret', 50)->nullable();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* 2019_12_28_191351_make_locations_table.php
|
||||
* Copyright (c) 2020 james@firefly-iii.org
|
||||
* Copyright (c) 2020 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -27,7 +27,7 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class MakeLocationsTable
|
||||
* Class MakeLocationsTable.
|
||||
*/
|
||||
class MakeLocationsTable extends Migration
|
||||
{
|
||||
@@ -50,17 +50,17 @@ class MakeLocationsTable extends Migration
|
||||
{
|
||||
Schema::create(
|
||||
'locations', static function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->bigIncrements('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->integer('locatable_id', false, true);
|
||||
$table->string('locatable_type', 255);
|
||||
$table->integer('locatable_id', false, true);
|
||||
$table->string('locatable_type', 255);
|
||||
|
||||
$table->decimal('latitude', 24, 12)->nullable();
|
||||
$table->decimal('longitude', 24, 12)->nullable();
|
||||
$table->smallInteger('zoom_level', false, true)->nullable();
|
||||
}
|
||||
$table->decimal('latitude', 24, 12)->nullable();
|
||||
$table->decimal('longitude', 24, 12)->nullable();
|
||||
$table->smallInteger('zoom_level', false, true)->nullable();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
/**
|
||||
* Class ChangesForV520
|
||||
* Class ChangesForV520.
|
||||
*/
|
||||
class ChangesForV520 extends Migration
|
||||
{
|
||||
@@ -38,7 +40,6 @@ class ChangesForV520 extends Migration
|
||||
$table->decimal('amount', 22, 12);
|
||||
$table->string('period', 50);
|
||||
|
||||
|
||||
//$table->string('password', 60);
|
||||
//$table->string('remember_token', 100)->nullable();
|
||||
//$table->string('reset', 32)->nullable();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* AccountTypeSeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use FireflyIII\Models\AccountType;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class AccountTypeSeeder
|
||||
* Class AccountTypeSeeder.
|
||||
*/
|
||||
class AccountTypeSeeder extends Seeder
|
||||
{
|
||||
|
@@ -1,9 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* ConfigSeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -25,7 +26,7 @@ use FireflyIII\Models\Configuration;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class ConfigSeeder
|
||||
* Class ConfigSeeder.
|
||||
*/
|
||||
class ConfigSeeder extends Seeder
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* DatabaseSeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class DatabaseSeeder
|
||||
* Class DatabaseSeeder.
|
||||
*/
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* LinkTypeSeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,13 +24,10 @@ use FireflyIII\Models\LinkType;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class LinkTypeSeeder
|
||||
* Class LinkTypeSeeder.
|
||||
*/
|
||||
class LinkTypeSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$types = [
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* PermissionSeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use FireflyIII\Models\Role;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class PermissionSeeder
|
||||
* Class PermissionSeeder.
|
||||
*/
|
||||
class PermissionSeeder extends Seeder
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* TransactionCurrencySeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class TransactionCurrencySeeder
|
||||
* Class TransactionCurrencySeeder.
|
||||
*/
|
||||
class TransactionCurrencySeeder extends Seeder
|
||||
{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* TransactionTypeSeeder.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
* Copyright (c) 2019 james@firefly-iii.org.
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
@@ -24,7 +24,7 @@ use FireflyIII\Models\TransactionType;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* Class TransactionTypeSeeder
|
||||
* Class TransactionTypeSeeder.
|
||||
*/
|
||||
class TransactionTypeSeeder extends Seeder
|
||||
{
|
||||
|
Reference in New Issue
Block a user