From 626f97cd6519afa8bda5de55d0a4c98e96a8a175 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 21:54:42 +0000 Subject: [PATCH 01/16] Bump composer/composer from 2.0.12 to 2.0.13 Bumps [composer/composer](https://github.com/composer/composer) from 2.0.12 to 2.0.13. - [Release notes](https://github.com/composer/composer/releases) - [Changelog](https://github.com/composer/composer/blob/master/CHANGELOG.md) - [Commits](https://github.com/composer/composer/compare/2.0.12...2.0.13) Signed-off-by: dependabot[bot] --- composer.lock | 82 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 8eef1edc05..ce1ad1ca78 100644 --- a/composer.lock +++ b/composer.lock @@ -7520,20 +7520,21 @@ }, { "name": "composer/composer", - "version": "2.0.12", + "version": "2.0.13", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "6c12ce263da71641903e399c3ce8ecb08fd375fb" + "reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/6c12ce263da71641903e399c3ce8ecb08fd375fb", - "reference": "6c12ce263da71641903e399c3ce8ecb08fd375fb", + "url": "https://api.github.com/repos/composer/composer/zipball/986e8b86b7b570632ad0a905c3726c33dd4c0efb", + "reference": "986e8b86b7b570632ad0a905c3726c33dd4c0efb", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", + "composer/metadata-minifier": "^1.0", "composer/semver": "^3.0", "composer/spdx-licenses": "^1.2", "composer/xdebug-handler": "^1.1", @@ -7597,7 +7598,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.0.12" + "source": "https://github.com/composer/composer/tree/2.0.13" }, "funding": [ { @@ -7613,7 +7614,76 @@ "type": "tidelift" } ], - "time": "2021-04-01T08:14:59+00:00" + "time": "2021-04-27T11:11:08+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" }, { "name": "composer/semver", From eb5eca9fa50338845430710f63b78a9e28ab1558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 04:10:52 +0000 Subject: [PATCH 02/16] Bump laravel/framework from 8.38.0 to 8.40.0 Bumps [laravel/framework](https://github.com/laravel/framework) from 8.38.0 to 8.40.0. - [Release notes](https://github.com/laravel/framework/releases) - [Changelog](https://github.com/laravel/framework/blob/8.x/CHANGELOG-8.x.md) - [Commits](https://github.com/laravel/framework/compare/v8.38.0...v8.40.0) Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index ce1ad1ca78..b4f62653a0 100644 --- a/composer.lock +++ b/composer.lock @@ -1683,16 +1683,16 @@ }, { "name": "laravel/framework", - "version": "v8.38.0", + "version": "v8.40.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "26a73532c54d2c090692bf2e3e64e449669053ba" + "reference": "a654897ad7f97aea9d7ef292803939798c4a02a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/26a73532c54d2c090692bf2e3e64e449669053ba", - "reference": "26a73532c54d2c090692bf2e3e64e449669053ba", + "url": "https://api.github.com/repos/laravel/framework/zipball/a654897ad7f97aea9d7ef292803939798c4a02a4", + "reference": "a654897ad7f97aea9d7ef292803939798c4a02a4", "shasum": "" }, "require": { @@ -1847,7 +1847,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-04-20T13:50:21+00:00" + "time": "2021-04-28T14:38:56+00:00" }, { "name": "laravel/passport", From 831272d9719f35eed615f2415774440563114f59 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 06:46:36 +0200 Subject: [PATCH 03/16] Repair sequences for #4545 --- .../Correction/FixPostgresSequences.php | 122 ++++++++++++++++++ .../Commands/Upgrade/UpgradeDatabase.php | 6 + .../Controllers/System/InstallController.php | 1 + composer.json | 1 + composer.lock | 58 +++++---- 5 files changed, 160 insertions(+), 28 deletions(-) create mode 100644 app/Console/Commands/Correction/FixPostgresSequences.php diff --git a/app/Console/Commands/Correction/FixPostgresSequences.php b/app/Console/Commands/Correction/FixPostgresSequences.php new file mode 100644 index 0000000000..66720e4ed3 --- /dev/null +++ b/app/Console/Commands/Correction/FixPostgresSequences.php @@ -0,0 +1,122 @@ +getName() !== 'pgsql') { + $this->info('Command executed successfully.'); + + return 0; + } + $tablesToCheck = [ + '2fa_tokens', + 'account_meta', + 'account_types', + 'accounts', + 'attachments', + 'auto_budgets', + 'available_budgets', + 'bills', + 'budget_limits', + 'budget_transaction', + 'budget_transaction_journal', + 'budgets', + 'categories', + 'category_transaction', + 'category_transaction_journal', + 'configuration', + 'currency_exchange_rates', + 'export_jobs', + 'failed_jobs', + 'group_journals', + 'import_jobs', + 'jobs', + 'journal_links', + 'journal_meta', + 'limit_repetitions', + 'link_types', + 'locations', + 'migrations', + 'notes', + 'oauth_clients', + 'oauth_personal_access_clients', + 'object_groups', + 'permissions', + 'piggy_bank_events', + 'piggy_bank_repetitions', + 'piggy_banks', + 'preferences', + 'recurrences', + 'recurrences_meta', + 'recurrences_repetitions', + 'recurrences_transactions', + 'roles', + 'rt_meta', + 'rule_actions', + 'rule_groups', + 'rule_triggers', + 'rules', + 'tag_transaction_journal', + 'tags', + 'telemetry', + 'transaction_currencies', + 'transaction_groups', + 'transaction_journals', + 'transaction_types', + 'transactions', + 'users', + 'webhook_attempts', + 'webhook_messages', + 'webhooks', + ]; + + foreach ($tablesToCheck as $tableToCheck) { + $this->info(sprintf('Checking the next id sequence for table "%s".', $tableToCheck)); + + $highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first(); + $nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first(); + + if ($nextId->nextval < $highestId->max) { + DB::select(sprintf('SELECT setval(\'%s_id_seq\', %d)', $tableToCheck, $highestId->max)); + $highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first(); + $nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first(); + if ($nextId->nextval > $highestId->max) { + $this->info(sprintf('Table "%s" autoincrement corrected.', $tableToCheck)); + } + if ($nextId->nextval <= $highestId->max) { + $this->warn(sprintf('Arff! The nextval sequence is still all screwed up on table "%s".', $tableToCheck)); + } + } + } + + + return 0; + } +} diff --git a/app/Console/Commands/Upgrade/UpgradeDatabase.php b/app/Console/Commands/Upgrade/UpgradeDatabase.php index 8b8a813844..3870c6597a 100644 --- a/app/Console/Commands/Upgrade/UpgradeDatabase.php +++ b/app/Console/Commands/Upgrade/UpgradeDatabase.php @@ -130,6 +130,12 @@ class UpgradeDatabase extends Command $result = Artisan::output(); echo $result; + // artisan firefly-iii:fix-pgsql-sequences + $this->line('Fix PostgreSQL sequences.'); + Artisan::call('firefly-iii:fix-pgsql-sequences'); + $result = Artisan::output(); + echo $result; + $this->line('Now decrypting the database (if necessary)...'); Artisan::call('firefly-iii:decrypt-all'); $result = Artisan::output(); diff --git a/app/Http/Controllers/System/InstallController.php b/app/Http/Controllers/System/InstallController.php index f74120e1c0..d041c061f9 100644 --- a/app/Http/Controllers/System/InstallController.php +++ b/app/Http/Controllers/System/InstallController.php @@ -64,6 +64,7 @@ class InstallController extends Controller $this->upgradeCommands = [ // there are 3 initial commands 'migrate' => ['--seed' => true, '--force' => true], + 'firefly-iii:fix-pgsql-sequences' => [], 'firefly-iii:decrypt-all' => [], 'firefly-iii:restore-oauth-keys' => [], 'generate-keys' => [], // an exception :( diff --git a/composer.json b/composer.json index a18d293aca..44dadefe2c 100644 --- a/composer.json +++ b/composer.json @@ -154,6 +154,7 @@ ], "post-update-cmd": [ "@php artisan cache:clear", + "@php artisan firefly-iii:fix-pgsql-sequences", "@php artisan firefly-iii:decrypt-all", "@php artisan firefly-iii:transaction-identifiers", diff --git a/composer.lock b/composer.lock index e3b9f18cb7..d0239efc90 100644 --- a/composer.lock +++ b/composer.lock @@ -1928,16 +1928,16 @@ }, { "name": "laravel/ui", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "a1f82c6283c8373ea1958b8a27c3d5c98cade351" + "reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/a1f82c6283c8373ea1958b8a27c3d5c98cade351", - "reference": "a1f82c6283c8373ea1958b8a27c3d5c98cade351", + "url": "https://api.github.com/repos/laravel/ui/zipball/e2478cd0342a92ec1c8c77422553bda8ee004fd0", + "reference": "e2478cd0342a92ec1c8c77422553bda8ee004fd0", "shasum": "" }, "require": { @@ -1979,10 +1979,9 @@ "ui" ], "support": { - "issues": "https://github.com/laravel/ui/issues", - "source": "https://github.com/laravel/ui/tree/v3.2.0" + "source": "https://github.com/laravel/ui/tree/v3.2.1" }, - "time": "2021-01-06T19:20:22+00:00" + "time": "2021-04-27T18:17:41+00:00" }, { "name": "laravelcollective/html", @@ -8399,16 +8398,16 @@ }, { "name": "nunomaduro/larastan", - "version": "v0.7.4", + "version": "v0.7.5", "source": { "type": "git", "url": "https://github.com/nunomaduro/larastan.git", - "reference": "0ceef2a39b45be9d7f7dd96192a1721ba5112278" + "reference": "ba865c6683552608bc2360a459925abeda45a4cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/0ceef2a39b45be9d7f7dd96192a1721ba5112278", - "reference": "0ceef2a39b45be9d7f7dd96192a1721ba5112278", + "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/ba865c6683552608bc2360a459925abeda45a4cc", + "reference": "ba865c6683552608bc2360a459925abeda45a4cc", "shasum": "" }, "require": { @@ -8472,7 +8471,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/larastan/issues", - "source": "https://github.com/nunomaduro/larastan/tree/v0.7.4" + "source": "https://github.com/nunomaduro/larastan/tree/v0.7.5" }, "funding": [ { @@ -8492,7 +8491,7 @@ "type": "patreon" } ], - "time": "2021-04-16T08:25:31+00:00" + "time": "2021-04-29T14:43:35+00:00" }, { "name": "phar-io/manifest", @@ -8832,16 +8831,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.84", + "version": "0.12.85", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5" + "reference": "20e6333c0067875ad7697cd8acdf245c6ef69d03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9c43f15da8798c8f30a4b099e6a94530a558cfd5", - "reference": "9c43f15da8798c8f30a4b099e6a94530a558cfd5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/20e6333c0067875ad7697cd8acdf245c6ef69d03", + "reference": "20e6333c0067875ad7697cd8acdf245c6ef69d03", "shasum": "" }, "require": { @@ -8872,7 +8871,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.84" + "source": "https://github.com/phpstan/phpstan/tree/0.12.85" }, "funding": [ { @@ -8888,7 +8887,7 @@ "type": "tidelift" } ], - "time": "2021-04-19T17:10:54+00:00" + "time": "2021-04-27T14:13:16+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -9418,12 +9417,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "3c97c13698c448fdbbda20acb871884a2d8f45b1" + "reference": "2da463d475b13cf8c519d862f1a6423ab7a515e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/3c97c13698c448fdbbda20acb871884a2d8f45b1", - "reference": "3c97c13698c448fdbbda20acb871884a2d8f45b1", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/2da463d475b13cf8c519d862f1a6423ab7a515e3", + "reference": "2da463d475b13cf8c519d862f1a6423ab7a515e3", "shasum": "" }, "conflict": { @@ -9440,6 +9439,7 @@ "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", "baserproject/basercms": ">=4,<=4.3.6|>=4.4,<4.4.1", + "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bolt/bolt": "<3.7.1", "bolt/core": "<4.1.13", "brightlocal/phpwhois": "<=4.2.5", @@ -9451,7 +9451,7 @@ "centreon/centreon": "<18.10.8|>=19,<19.4.5", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", "codeigniter/framework": "<=3.0.6", - "composer/composer": "<=1-alpha.11", + "composer/composer": "<1.10.22|>=2-alpha.1,<2.0.13", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/core": ">=2,<3.5.39", "contao/core-bundle": ">=4,<4.4.52|>=4.5,<4.9.6|= 4.10.0", @@ -9503,7 +9503,7 @@ "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "fuel/core": "<1.8.1", "getgrav/grav": "<1.7.11", - "getkirby/cms": ">=3,<3.4.5", + "getkirby/cms": "<3.5.4", "getkirby/panel": "<2.5.14", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<=2.2", @@ -9511,7 +9511,7 @@ "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4", - "illuminate/database": "<6.20.14|>=7,<7.30.4|>=8,<8.24", + "illuminate/database": "<6.20.26|>=7,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": ">=7,<7.1.2", "impresscms/impresscms": "<=1.4.2", @@ -9524,7 +9524,7 @@ "kitodo/presentation": "<3.1.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", - "laravel/framework": "<6.20.14|>=7,<7.30.4|>=8,<8.24", + "laravel/framework": "<6.20.26|>=7,<8.40", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "league/commonmark": "<0.18.3", "librenms/librenms": "<1.53", @@ -9563,7 +9563,7 @@ "paragonie/random_compat": "<2", "passbolt/passbolt_api": "<2.11", "paypal/merchant-sdk-php": "<3.12", - "pear/archive_tar": "<1.4.13", + "pear/archive_tar": "<1.4.12", "personnummer/personnummer": "<3.0.2", "phpfastcache/phpfastcache": ">=5,<5.0.13", "phpmailer/phpmailer": "<6.1.6", @@ -9591,6 +9591,7 @@ "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6-beta", "rainlab/debugbar-plugin": "<3.1", + "rmccue/requests": ">=1.6,<1.8", "robrichards/xmlseclibs": "<3.0.4", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", @@ -9698,6 +9699,7 @@ "yiisoft/yii2-jui": "<2.0.4", "yiisoft/yii2-redis": "<2.0.8", "yourls/yourls": "<1.7.4", + "zendesk/zendesk_api_client_php": "<2.2.11", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", @@ -9756,7 +9758,7 @@ "type": "tidelift" } ], - "time": "2021-04-22T17:19:04+00:00" + "time": "2021-04-30T18:08:49+00:00" }, { "name": "sebastian/cli-parser", From 7775a0141becbe1c4c2e788062a4af33aa4e3043 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 06:53:42 +0200 Subject: [PATCH 04/16] Skips pgsql for some reason. --- app/Console/Commands/Correction/FixPostgresSequences.php | 2 ++ app/Console/Commands/Upgrade/UpgradeDatabase.php | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/Correction/FixPostgresSequences.php b/app/Console/Commands/Correction/FixPostgresSequences.php index 66720e4ed3..7c3d19fa42 100644 --- a/app/Console/Commands/Correction/FixPostgresSequences.php +++ b/app/Console/Commands/Correction/FixPostgresSequences.php @@ -30,11 +30,13 @@ class FixPostgresSequences extends Command */ public function handle(): int { + if (DB::connection()->getName() !== 'pgsql') { $this->info('Command executed successfully.'); return 0; } + $this->line('Going to verify PostgreSQL table sequences.'); $tablesToCheck = [ '2fa_tokens', 'account_meta', diff --git a/app/Console/Commands/Upgrade/UpgradeDatabase.php b/app/Console/Commands/Upgrade/UpgradeDatabase.php index 3870c6597a..9f0055a5fe 100644 --- a/app/Console/Commands/Upgrade/UpgradeDatabase.php +++ b/app/Console/Commands/Upgrade/UpgradeDatabase.php @@ -130,7 +130,6 @@ class UpgradeDatabase extends Command $result = Artisan::output(); echo $result; - // artisan firefly-iii:fix-pgsql-sequences $this->line('Fix PostgreSQL sequences.'); Artisan::call('firefly-iii:fix-pgsql-sequences'); $result = Artisan::output(); From 1c2b14868bfc6aed96b5986c6e4b479b974a46b1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 07:07:32 +0200 Subject: [PATCH 05/16] Skip if null --- app/Console/Commands/Correction/FixPostgresSequences.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Console/Commands/Correction/FixPostgresSequences.php b/app/Console/Commands/Correction/FixPostgresSequences.php index 7c3d19fa42..0496b81f2e 100644 --- a/app/Console/Commands/Correction/FixPostgresSequences.php +++ b/app/Console/Commands/Correction/FixPostgresSequences.php @@ -104,6 +104,10 @@ class FixPostgresSequences extends Command $highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first(); $nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first(); + if(null === $nextId) { + $this->line(sprintf('nextval is NULL for table "%s"', $tableToCheck)); + continue; + } if ($nextId->nextval < $highestId->max) { DB::select(sprintf('SELECT setval(\'%s_id_seq\', %d)', $tableToCheck, $highestId->max)); From 8ffe08bfb9fe62d8ae77204f3429179758b08a1e Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 07:14:43 +0200 Subject: [PATCH 06/16] Add more info. --- app/Console/Commands/Correction/FixPostgresSequences.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/Correction/FixPostgresSequences.php b/app/Console/Commands/Correction/FixPostgresSequences.php index 0496b81f2e..694aa962cc 100644 --- a/app/Console/Commands/Correction/FixPostgresSequences.php +++ b/app/Console/Commands/Correction/FixPostgresSequences.php @@ -105,7 +105,7 @@ class FixPostgresSequences extends Command $highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first(); $nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first(); if(null === $nextId) { - $this->line(sprintf('nextval is NULL for table "%s"', $tableToCheck)); + $this->line(sprintf('nextval is NULL for table "%s", go to next table.', $tableToCheck)); continue; } @@ -120,6 +120,9 @@ class FixPostgresSequences extends Command $this->warn(sprintf('Arff! The nextval sequence is still all screwed up on table "%s".', $tableToCheck)); } } + if ($nextId->nextval >= $highestId->max) { + $this->info(sprintf('Table "%s" autoincrement is correct.', $tableToCheck)); + } } From fae5cdae506b781921d15433db43ae07698635cd Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 08:36:19 +0200 Subject: [PATCH 07/16] Fix issue in link. --- app/Http/Controllers/Transaction/IndexController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Transaction/IndexController.php b/app/Http/Controllers/Transaction/IndexController.php index fcec1abf82..d32d5af5b0 100644 --- a/app/Http/Controllers/Transaction/IndexController.php +++ b/app/Http/Controllers/Transaction/IndexController.php @@ -77,6 +77,10 @@ class IndexController extends Controller */ public function index(Request $request, string $objectType, Carbon $start = null, Carbon $end = null) { + if('transfers' === $objectType) { + $objectType = 'transfer'; + } + $subTitleIcon = config('firefly.transactionIconsByType.' . $objectType); $types = config('firefly.transactionTypesByType.' . $objectType); $page = (int)$request->get('page'); From 3298f2d81576b92eb08e580c2686983a65786d41 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 08:47:20 +0200 Subject: [PATCH 08/16] Form changes. --- frontend/src/components/transactions/SplitForm.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/transactions/SplitForm.vue b/frontend/src/components/transactions/SplitForm.vue index ccf30266d0..d96e52ac62 100644 --- a/frontend/src/components/transactions/SplitForm.vue +++ b/frontend/src/components/transactions/SplitForm.vue @@ -351,18 +351,22 @@ export default { sourceAllowedTypes: { type: Array, required: false, - default: [] + default: function () { + return []; + } }, // allowed source account types. destinationAllowedTypes: { type: Array, required: false, - default: [] + default: function () { + return []; + } }, // allow switch? allowSwitch: { type: Boolean, required: false, - default: true + default: false } }, From ea0942b7fe3327ef1b61614b9eff4011fc0e253c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 1 May 2021 09:47:21 +0200 Subject: [PATCH 09/16] Update for 5.5.10 --- .../Correction/FixPostgresSequences.php | 1 + .../Transaction/IndexController.php | 2 +- changelog.md | 12 + config/firefly.php | 2 +- .../src/components/dashboard/MainAccount.vue | 11 - .../components/dashboard/MainCategoryList.vue | 2 +- .../components/dashboard/MainCreditList.vue | 4 +- .../components/dashboard/MainDebitList.vue | 2 +- .../src/components/dashboard/TopBoxes.vue | 9 +- frontend/src/components/transactions/Edit.vue | 194 +++++++--- .../src/components/transactions/SplitForm.vue | 8 +- .../components/transactions/SplitPills.vue | 21 +- frontend/src/locales/bg.json | 16 +- frontend/src/locales/cs.json | 16 +- frontend/src/locales/de.json | 16 +- frontend/src/locales/el.json | 16 +- frontend/src/locales/en-gb.json | 16 +- frontend/src/locales/en.json | 16 +- frontend/src/locales/es.json | 16 +- frontend/src/locales/fi.json | 16 +- frontend/src/locales/fr.json | 16 +- frontend/src/locales/hu.json | 16 +- frontend/src/locales/it.json | 16 +- frontend/src/locales/nb.json | 16 +- frontend/src/locales/nl.json | 16 +- frontend/src/locales/pl.json | 16 +- frontend/src/locales/pt-br.json | 16 +- frontend/src/locales/pt.json | 16 +- frontend/src/locales/ro.json | 16 +- frontend/src/locales/ru.json | 16 +- frontend/src/locales/sk.json | 16 +- frontend/src/locales/sv.json | 16 +- frontend/src/locales/vi.json | 18 +- frontend/src/locales/zh-cn.json | 16 +- frontend/src/locales/zh-tw.json | 16 +- frontend/yarn.lock | 363 ++++++++++-------- public/v1/js/app_vue.js | 2 +- public/v2/js/accounts/create.js | 2 +- public/v2/js/accounts/delete.js | 2 +- public/v2/js/accounts/index.js | 2 +- public/v2/js/accounts/show.js | 2 +- public/v2/js/dashboard.js | 2 +- public/v2/js/dashboard.js.map | 2 +- public/v2/js/transactions/create.js | 2 +- public/v2/js/transactions/create.js.map | 2 +- public/v2/js/transactions/edit.js | 2 +- public/v2/js/transactions/edit.js.map | 2 +- public/v2/js/transactions/index.js | 2 +- public/v2/js/vendor.js | 2 +- public/v2/js/vendor.js.LICENSE.txt | 4 +- public/v2/js/vendor.js.map | 2 +- resources/lang/bg_BG/firefly.php | 1 - resources/lang/cs_CZ/firefly.php | 1 - resources/lang/de_DE/firefly.php | 1 - resources/lang/el_GR/firefly.php | 1 - resources/lang/en_GB/firefly.php | 1 - resources/lang/en_US/firefly.php | 1 - resources/lang/es_ES/firefly.php | 1 - resources/lang/fi_FI/firefly.php | 1 - resources/lang/fr_FR/firefly.php | 1 - resources/lang/hu_HU/firefly.php | 1 - resources/lang/id_ID/config.php | 2 +- resources/lang/id_ID/firefly.php | 29 +- resources/lang/id_ID/validation.php | 4 +- resources/lang/it_IT/firefly.php | 1 - resources/lang/nb_NO/firefly.php | 1 - resources/lang/nl_NL/firefly.php | 1 - resources/lang/pl_PL/firefly.php | 1 - resources/lang/pt_BR/firefly.php | 1 - resources/lang/pt_PT/firefly.php | 1 - resources/lang/ro_RO/firefly.php | 1 - resources/lang/ru_RU/firefly.php | 1 - resources/lang/sk_SK/firefly.php | 1 - resources/lang/sv_SE/firefly.php | 1 - resources/lang/tr_TR/firefly.php | 1 - resources/lang/vi_VN/config.php | 2 +- resources/lang/vi_VN/firefly.php | 1 - resources/lang/zh_CN/firefly.php | 1 - resources/lang/zh_TW/firefly.php | 1 - yarn.lock | 329 +++++++++------- 80 files changed, 941 insertions(+), 482 deletions(-) diff --git a/app/Console/Commands/Correction/FixPostgresSequences.php b/app/Console/Commands/Correction/FixPostgresSequences.php index 694aa962cc..2ac42466c9 100644 --- a/app/Console/Commands/Correction/FixPostgresSequences.php +++ b/app/Console/Commands/Correction/FixPostgresSequences.php @@ -1,4 +1,5 @@ get('page'); diff --git a/changelog.md b/changelog.md index 87d8c1ab45..74c253ce23 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + +## 5.5.10 - 2021-05-01 + +### Changed +- [Issue 4708](https://github.com/firefly-iii/firefly-iii/issues/4708) When searching for the external ID, Firefly III will now only return the exact match. + +### Fixed +- [Issue 4545](https://github.com/firefly-iii/firefly-iii/issues/4545) Rare but annoying issue with PostgreSQL increments will be repaired during image boot time. Thanks @jaylenw! +- [Issue 4710](https://github.com/firefly-iii/firefly-iii/issues/4710) Some rule actions could not handle liabilities. +- [Issue 4715](https://github.com/firefly-iii/firefly-iii/issues/4715) Fixed some titles. +- [Issue 4720](https://github.com/firefly-iii/firefly-iii/issues/4720) Could not remove a split in the new layout. + ## 5.5.9 (API 1.5.2) 2021-04-24 This update fixes some of the more annoying issues in the new experimental v2 layout (see also [GitHub](https://github.com/firefly-iii/firefly-iii/issues/4618)), but some minor other issues as well. diff --git a/config/firefly.php b/config/firefly.php index 82a3b3b649..7a9fc5f730 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -100,7 +100,7 @@ return [ 'handle_debts' => true, ], - 'version' => '5.5.9', + 'version' => '5.5.10', 'api_version' => '1.5.2', 'db_version' => 16, 'maxUploadSize' => 1073741824, // 1 GB diff --git a/frontend/src/components/dashboard/MainAccount.vue b/frontend/src/components/dashboard/MainAccount.vue index 786cc84332..72dc7aa9a8 100644 --- a/frontend/src/components/dashboard/MainAccount.vue +++ b/frontend/src/components/dashboard/MainAccount.vue @@ -33,9 +33,6 @@
-
- {{ $t('firefly.timezone_difference', {local: localTimeZone, system: systemTimeZone}) }} -