mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
chore: small fixes and prep for new language
This commit is contained in:
@@ -32,6 +32,9 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
*/
|
||||
class CreateSupportTables extends Migration
|
||||
{
|
||||
private const TABLE_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
|
||||
private const TABLE_ERROR = 'Could not create table "%s": %s';
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
@@ -86,8 +89,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "account_types": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'account_types', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,8 +113,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "configuration": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'configuration', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,8 +141,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "transaction_currencies": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'transaction_currencies', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,8 +170,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "jobs": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'jobs', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,8 +193,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "password_resets": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'password_resets', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -216,8 +219,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "permission_role": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'permission_role', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,8 +243,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "permissions": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'permissions', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -264,8 +267,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "roles": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'roles', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -289,8 +292,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "sessions": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'sessions', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -315,8 +318,8 @@ class CreateSupportTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "transaction_types": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'transaction_types', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,6 +32,9 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
*/
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
private const TABLE_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
|
||||
private const TABLE_ERROR = 'Could not create table "%s": %s';
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
@@ -62,8 +65,8 @@ class CreateUsersTable extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "users": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'users', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,6 +32,9 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
*/
|
||||
class CreateMainTables extends Migration
|
||||
{
|
||||
private const TABLE_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
|
||||
private const TABLE_ERROR = 'Could not create table "%s": %s';
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
@@ -108,8 +111,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "accounts": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'accounts', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,8 +130,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "account_meta": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'account_meta', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,8 +163,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "attachments": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'attachments', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,8 +197,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "bills": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'bills', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,8 +223,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "budgets": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'budgets', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
if (!Schema::hasTable('budget_limits')) {
|
||||
@@ -240,8 +243,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "budget_limits": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'budget_limits', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
if (!Schema::hasTable('limit_repetitions')) {
|
||||
@@ -259,8 +262,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "limit_repetitions": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'limit_repetitions', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -287,8 +290,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "categories": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'categories', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,8 +319,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "piggy_banks": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'piggy_banks', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,8 +339,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "piggy_bank_repetitions": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'piggy_bank_repetitions', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -359,8 +362,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "preferences": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'preferences', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -385,8 +388,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "role_user": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'role_user', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,32 +415,37 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "rule_groups": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'rule_groups', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
if (!Schema::hasTable('rules')) {
|
||||
Schema::create(
|
||||
'rules',
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('rule_group_id', false, true);
|
||||
$table->string('title', 255);
|
||||
$table->text('description')->nullable();
|
||||
$table->integer('order', false, true)->default(0);
|
||||
$table->boolean('active')->default(1);
|
||||
$table->boolean('stop_processing')->default(0);
|
||||
try {
|
||||
Schema::create(
|
||||
'rules',
|
||||
static function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('rule_group_id', false, true);
|
||||
$table->string('title', 255);
|
||||
$table->text('description')->nullable();
|
||||
$table->integer('order', false, true)->default(0);
|
||||
$table->boolean('active')->default(1);
|
||||
$table->boolean('stop_processing')->default(0);
|
||||
|
||||
// link user id to users table
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
// link user id to users table
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
|
||||
// link rule group id to rule group table
|
||||
$table->foreign('rule_group_id')->references('id')->on('rule_groups')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
// link rule group id to rule group table
|
||||
$table->foreign('rule_group_id')->references('id')->on('rule_groups')->onDelete('cascade');
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'rules', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
if (!Schema::hasTable('rule_actions')) {
|
||||
try {
|
||||
@@ -460,8 +468,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "rule_actions": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'rule_actions', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
if (!Schema::hasTable('rule_triggers')) {
|
||||
@@ -485,8 +493,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "rule_triggers": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'rule_triggers', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -519,8 +527,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "tags": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'tags', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -558,8 +566,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "transaction_journals": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'transaction_journals', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -578,8 +586,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "journal_meta": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'journal_meta', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -599,8 +607,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "tag_transaction_journal": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'tag_transaction_journal', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,8 +625,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "budget_transaction_journal": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'budget_transaction_journal', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -635,8 +643,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "category_transaction_journal": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'category_transaction_journal', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,8 +665,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "piggy_bank_events": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'piggy_bank_events', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -680,8 +688,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "transactions": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'transactions', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,8 +707,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "budget_transaction": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'budget_transaction', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,8 +726,8 @@ class CreateMainTables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not create table "category_transaction": %s', $e->getMessage()));
|
||||
Log::error('If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.');
|
||||
Log::error(sprintf(self::TABLE_ERROR, 'category_transaction', $e->getMessage()));
|
||||
Log::error(self::TABLE_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,6 +32,9 @@ use Illuminate\Database\Schema\Blueprint;
|
||||
*/
|
||||
class FixNullables extends Migration
|
||||
{
|
||||
private const COLUMN_ALREADY_EXISTS = 'If this table exists already (see the error message), this is not a problem. Other errors? Please open a discussion on GitHub.';
|
||||
private const TABLE_UPDATE_ERROR = 'Could not update table "%s": %s';
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
@@ -54,8 +57,8 @@ class FixNullables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not update table: %s', $e->getMessage()));
|
||||
Log::error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
Log::error(sprintf(self::TABLE_UPDATE_ERROR, 'rule_groups', $e->getMessage()));
|
||||
Log::error(self::COLUMN_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +71,8 @@ class FixNullables extends Migration
|
||||
}
|
||||
);
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('Could not execute query: %s', $e->getMessage()));
|
||||
Log::error('If the column or index already exists (see error), this is not an problem. Otherwise, please open a GitHub discussion.');
|
||||
Log::error(sprintf(self::TABLE_UPDATE_ERROR, 'rules', $e->getMessage()));
|
||||
Log::error(self::COLUMN_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user