mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix tables.
This commit is contained in:
parent
60f6a91fe4
commit
d182b4b4a6
@ -80,7 +80,7 @@ class ForceMigration extends Command
|
|||||||
sleep(2);
|
sleep(2);
|
||||||
Schema::dropIfExists('migrations');
|
Schema::dropIfExists('migrations');
|
||||||
$this->friendlyLine('Re-run all migrations...');
|
$this->friendlyLine('Re-run all migrations...');
|
||||||
Artisan::call('migrate', ['--seed' => true]);
|
Artisan::call('migrate', ['--seed' => true,'--force' => true]);
|
||||||
sleep(2);
|
sleep(2);
|
||||||
$this->friendlyLine('');
|
$this->friendlyLine('');
|
||||||
$this->friendlyWarning('There is a good chance you just saw a lot of error messages.');
|
$this->friendlyWarning('There is a good chance you just saw a lot of error messages.');
|
||||||
|
@ -47,7 +47,7 @@ class FixPostgresSequences extends Command
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->friendlyLine('Going to verify PostgreSQL table sequences.');
|
$this->friendlyLine('Going to verify PostgreSQL table sequences.');
|
||||||
$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', 'failed_jobs', 'group_journals', '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', 'transaction_currencies', 'transaction_groups', 'transaction_journals', 'transaction_types', 'transactions', 'users', 'webhook_attempts', 'webhook_messages', 'webhooks'];
|
$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', 'failed_jobs', 'group_journals', 'jobs', 'journal_links', 'journal_meta', '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', 'transaction_currencies', 'transaction_groups', 'transaction_journals', 'transaction_types', 'transactions', 'users', 'webhook_attempts', 'webhook_messages', 'webhooks'];
|
||||||
|
|
||||||
foreach ($tablesToCheck as $tableToCheck) {
|
foreach ($tablesToCheck as $tableToCheck) {
|
||||||
$this->friendlyLine(sprintf('Checking the next id sequence for table "%s".', $tableToCheck));
|
$this->friendlyLine(sprintf('Checking the next id sequence for table "%s".', $tableToCheck));
|
||||||
|
@ -154,7 +154,7 @@ class TransactionIdentifier extends Command
|
|||||||
app('log')->error($e->getMessage());
|
app('log')->error($e->getMessage());
|
||||||
$this->friendlyError('Firefly III could not find the "identifier" field in the "transactions" table.');
|
$this->friendlyError('Firefly III could not find the "identifier" field in the "transactions" table.');
|
||||||
$this->friendlyError(sprintf('This field is required for Firefly III version %s to run.', config('firefly.version')));
|
$this->friendlyError(sprintf('This field is required for Firefly III version %s to run.', config('firefly.version')));
|
||||||
$this->friendlyError('Please run "php artisan migrate" to add this field to the table.');
|
$this->friendlyError('Please run "php artisan migrate --force" to add this field to the table.');
|
||||||
$this->friendlyError('Then, run "php artisan firefly:upgrade-database" to try again.');
|
$this->friendlyError('Then, run "php artisan firefly:upgrade-database" to try again.');
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user