Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Clean up models. Clean up models.
James Colebcfbdcf3f09d
diff --git a/app/Console/Commands/DecryptDatabase.php b/app/Console/Commands/DecryptDatabase.phpindex 7dfcb24179..d0f06bdf5e 100644--- a/app/Console/Commands/DecryptDatabase.php+++ b/app/Console/Commands/DecryptDatabase.php@@ -30,6 +30,7 @@ use FireflyIII\Exceptions\FireflyException;use FireflyIII\Models\Preference;use Illuminate\Console\Command;use Illuminate\Contracts\Encryption\DecryptException;+use JsonException;use Log;/**@@ -92,7 +93,11 @@ class DecryptDatabase extends Command// A separate routine for preferences:if ('preferences' === $table) {// try to json_decrypt the value.- $value = json_decode($value, true, 512, JSON_THROW_ON_ERROR) ?? $value;+ try {+ $value = json_decode($value, true, 512, JSON_THROW_ON_ERROR) ?? $value;+ } catch(JsonException $e) {+ Log::error($e->getMessage());+ }Log::debug(sprintf('Decrypted field "%s" "%s" to "%s" in table "%s" (row #%d)', $field, $original, print_r($value, true), $table, $id));/** @var Preference $object */diff --git a/app/User.php b/app/User.phpindex 02cd24b49d..52b514cb4c 100644--- a/app/User.php+++ b/app/User.php@@ -114,6 +114,30 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;* @method static Builder|User whereReset($value)* @method static Builder|User whereUpdatedAt($value)* @mixin Eloquent+ * @property string|null $objectguid+ * @property-read int|null $accounts_count+ * @property-read int|null $attachments_count+ * @property-read int|null $available_budgets_count+ * @property-read int|null $bills_count+ * @property-read int|null $budgets_count+ * @property-read int|null $categories_count+ * @property-read int|null $clients_count+ * @property-read int|null $currency_exchange_rates_count+ * @property-read int|null $import_jobs_count+ * @property-read int|null $notifications_count+ * @property-read int|null $piggy_banks_count+ * @property-read int|null $preferences_count+ * @property-read int|null $recurrences_count+ * @property-read int|null $roles_count+ * @property-read int|null $rule_groups_count+ * @property-read int|null $rules_count+ * @property-read int|null $tags_count+ * @property-read int|null $tokens_count+ * @property-read int|null $transaction_groups_count+ * @property-read int|null $transaction_journals_count+ * @property-read int|null $transactions_count+ * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereMfaSecret($value)+ * @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereObjectguid($value)*/class User extends Authenticatable{