mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add void to a lot of methods.
This commit is contained in:
@@ -77,7 +77,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'account_types',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('type', 50);
|
||||
@@ -99,7 +99,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'transaction_currencies',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -124,7 +124,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'transaction_types',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -147,7 +147,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'jobs',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// straight from Laravel
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
@@ -173,7 +173,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'password_resets',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// straight from laravel
|
||||
$table->string('email')->index();
|
||||
$table->string('token')->index();
|
||||
@@ -193,7 +193,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'permissions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('name')->unique();
|
||||
@@ -214,7 +214,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'roles',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('name')->unique();
|
||||
@@ -235,7 +235,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'permission_role',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('permission_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned();
|
||||
|
||||
@@ -258,7 +258,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'sessions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('id')->unique();
|
||||
$table->integer('user_id')->nullable();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
@@ -280,7 +280,7 @@ class CreateSupportTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'configuration',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -54,7 +54,7 @@ class CreateUsersTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('email', 255);
|
||||
|
||||
@@ -96,7 +96,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'accounts',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -121,7 +121,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'account_meta',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('account_id', false, true);
|
||||
@@ -143,7 +143,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'piggy_banks',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -168,7 +168,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'piggy_bank_repetitions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('piggy_bank_id', false, true);
|
||||
@@ -191,7 +191,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'attachments',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -224,7 +224,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -258,7 +258,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'budgets',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -278,7 +278,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('budget_id', false, true);
|
||||
@@ -298,7 +298,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'limit_repetitions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('budget_limit_id', false, true);
|
||||
@@ -321,7 +321,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'categories',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -346,7 +346,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'preferences',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('user_id', false, true);
|
||||
@@ -369,7 +369,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'role_user',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('role_id', false, true);
|
||||
|
||||
@@ -392,7 +392,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'rule_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -415,7 +415,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'rules',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -443,7 +443,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'rule_actions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('rule_id', false, true);
|
||||
@@ -468,7 +468,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'rule_triggers',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('rule_id', false, true);
|
||||
@@ -497,7 +497,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'tags',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -528,7 +528,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'transaction_journals',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -561,7 +561,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'journal_meta',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -581,7 +581,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'tag_transaction_journal',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('tag_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -602,7 +602,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'budget_transaction_journal',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('budget_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -620,7 +620,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'category_transaction_journal',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
@@ -638,7 +638,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'piggy_bank_events',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('piggy_bank_id', false, true);
|
||||
@@ -660,7 +660,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -683,7 +683,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'budget_transaction',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('budget_id', false, true);
|
||||
$table->integer('transaction_id', false, true);
|
||||
@@ -702,7 +702,7 @@ class CreateMainTables extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'category_transaction',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('category_id', false, true);
|
||||
$table->integer('transaction_id', false, true);
|
||||
|
||||
@@ -51,7 +51,7 @@ class FixNullables extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'rule_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->text('description')->nullable()->change();
|
||||
}
|
||||
);
|
||||
@@ -65,7 +65,7 @@ class FixNullables extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'rules',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->text('description')->nullable()->change();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -42,7 +42,7 @@ class ExpandTransactionsTable extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('identifier');
|
||||
}
|
||||
);
|
||||
@@ -64,7 +64,7 @@ class ExpandTransactionsTable extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->smallInteger('identifier', false, true)->default(0);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -51,7 +51,7 @@ class ChangesForV410 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'notes',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -41,7 +41,7 @@ class ChangesForV420 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'journal_meta',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropSoftDeletes();
|
||||
}
|
||||
);
|
||||
@@ -63,7 +63,7 @@ class ChangesForV420 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'journal_meta',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->softDeletes();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -51,7 +51,7 @@ class ChangesForV430 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'available_budgets',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('repeat_freq', 30)->nullable();
|
||||
}
|
||||
);
|
||||
@@ -56,7 +56,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->boolean('repeats')->default(0);
|
||||
}
|
||||
);
|
||||
@@ -70,7 +70,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->renameColumn('start_date', 'startdate');
|
||||
}
|
||||
);
|
||||
@@ -85,7 +85,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('end_date');
|
||||
}
|
||||
);
|
||||
@@ -99,7 +99,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('decimal_places');
|
||||
}
|
||||
);
|
||||
@@ -122,7 +122,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->smallInteger('decimal_places', false, true)->default(2);
|
||||
}
|
||||
);
|
||||
@@ -137,7 +137,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->renameColumn('startdate', 'start_date');
|
||||
}
|
||||
);
|
||||
@@ -152,7 +152,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->date('end_date')->nullable()->after('start_date');
|
||||
}
|
||||
);
|
||||
@@ -167,7 +167,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('repeats');
|
||||
}
|
||||
);
|
||||
@@ -180,7 +180,7 @@ class ChangesForV431 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('repeat_freq');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV440 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('transactions', 'transaction_currency_id')) {
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
@@ -70,7 +70,7 @@ class ChangesForV440 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'currency_exchange_rates',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -95,7 +95,7 @@ class ChangesForV440 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
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');
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV450 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('foreign_amount');
|
||||
}
|
||||
);
|
||||
@@ -56,7 +56,7 @@ class ChangesForV450 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('transactions_foreign_currency_id_foreign');
|
||||
@@ -71,7 +71,7 @@ class ChangesForV450 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('foreign_currency_id');
|
||||
}
|
||||
);
|
||||
@@ -94,7 +94,7 @@ class ChangesForV450 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->decimal('foreign_amount', 32, 12)->nullable()->after('amount');
|
||||
}
|
||||
);
|
||||
@@ -109,7 +109,7 @@ class ChangesForV450 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$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');
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class ChangesForV470 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'link_types',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -75,7 +75,7 @@ class ChangesForV470 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'journal_links',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->integer('link_type_id', false, true);
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV470a extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('reconciled');
|
||||
}
|
||||
);
|
||||
@@ -65,7 +65,7 @@ class ChangesForV470a extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->boolean('reconciled')->after('deleted_at')->default(0);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreateOauthAuthCodesTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'oauth_auth_codes',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->integer('user_id');
|
||||
$table->integer('client_id');
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreateOauthAccessTokensTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'oauth_access_tokens',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->integer('user_id')->index()->nullable();
|
||||
$table->integer('client_id');
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreateOauthRefreshTokensTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'oauth_refresh_tokens',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('id', 100)->primary();
|
||||
$table->string('access_token_id', 100)->index();
|
||||
$table->boolean('revoked');
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreateOauthClientsTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'oauth_clients',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->index()->nullable();
|
||||
$table->string('name');
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreateOauthPersonalAccessClientsTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'oauth_personal_access_clients',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('client_id')->index();
|
||||
$table->timestamps();
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV472 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'attachments',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->text('notes')->nullable();
|
||||
}
|
||||
);
|
||||
@@ -57,7 +57,7 @@ class ChangesForV472 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budgets',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('order');
|
||||
}
|
||||
);
|
||||
@@ -79,7 +79,7 @@ class ChangesForV472 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'attachments',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('notes');
|
||||
}
|
||||
);
|
||||
@@ -93,7 +93,7 @@ class ChangesForV472 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budgets',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->mediumInteger('order', false, true)->default(0);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@ class ChangesForV473 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('bills_transaction_currency_id_foreign');
|
||||
@@ -62,7 +62,7 @@ class ChangesForV473 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'rules',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('strict');
|
||||
}
|
||||
);
|
||||
@@ -84,7 +84,7 @@ class ChangesForV473 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('transaction_currency_id', false, true)->nullable()->after('user_id');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class ChangesForV473 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'rules',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->boolean('strict')->default(true);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -56,7 +56,7 @@ class ChangesForV475 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'recurrences',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -87,7 +87,7 @@ class ChangesForV475 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'recurrences_transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -118,7 +118,7 @@ class ChangesForV475 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'recurrences_repetitions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -141,7 +141,7 @@ class ChangesForV475 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'recurrences_meta',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -163,7 +163,7 @@ class ChangesForV475 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'rt_meta',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV477 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('budget_limits_transaction_currency_id_foreign');
|
||||
@@ -70,7 +70,7 @@ class ChangesForV477 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('transaction_currency_id', false, true)->nullable()->after('budget_id');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null');
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV479 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn(['enabled']);
|
||||
}
|
||||
);
|
||||
@@ -65,7 +65,7 @@ class ChangesForV479 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->boolean('enabled')->default(0)->after('deleted_at');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -54,7 +54,7 @@ class ChangesForV4710 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'transaction_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -74,7 +74,7 @@ class ChangesForV4710 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'group_journals',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('transaction_group_id', false, true);
|
||||
$table->integer('transaction_journal_id', false, true);
|
||||
|
||||
@@ -57,7 +57,7 @@ class ChangesForV4711 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_journals',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
);
|
||||
@@ -69,7 +69,7 @@ class ChangesForV4711 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'preferences',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->text('data')->nullable()->change();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -56,7 +56,7 @@ class ChangesForV4712 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_journals',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dateTime('date')->change();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ class FixLdapConfiguration extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn(['objectguid']);
|
||||
}
|
||||
);
|
||||
@@ -69,7 +69,7 @@ class FixLdapConfiguration extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->uuid('objectguid')->nullable()->after('id');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ class ChangesForV480 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_journals',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// drop transaction_group_id + foreign key.
|
||||
// cannot drop foreign keys in SQLite:
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
@@ -74,7 +74,7 @@ class ChangesForV480 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'rule_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
try {
|
||||
$table->dropColumn('stop_processing');
|
||||
} catch (ColumnDoesNotExist|QueryException $e) {
|
||||
@@ -94,7 +94,7 @@ class ChangesForV480 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
try {
|
||||
$table->dropColumn('mfa_secret');
|
||||
} catch (ColumnDoesNotExist|QueryException $e) {
|
||||
@@ -122,7 +122,7 @@ class ChangesForV480 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_journals',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('transaction_currency_id', false, true)->nullable()->change();
|
||||
|
||||
// add column "group_id" after "transaction_type_id"
|
||||
@@ -152,7 +152,7 @@ class ChangesForV480 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'rule_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->boolean('stop_processing')->default(false);
|
||||
}
|
||||
);
|
||||
@@ -167,7 +167,7 @@ class ChangesForV480 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('mfa_secret', 50)->nullable();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ class MakeLocationsTable extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'locations',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -52,7 +52,7 @@ class ChangesForV520 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'auto_budgets',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -53,7 +53,7 @@ class ChangesForV530 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'object_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->integer('user_id', false, true);
|
||||
$table->timestamps();
|
||||
@@ -73,7 +73,7 @@ class ChangesForV530 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'object_groupables',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('object_group_id');
|
||||
$table->integer('object_groupable_id', false, true);
|
||||
$table->string('object_groupable_type', 255);
|
||||
|
||||
@@ -44,7 +44,7 @@ class ChangesForV530a extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('order');
|
||||
}
|
||||
);
|
||||
@@ -66,7 +66,7 @@ class ChangesForV530a extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('order', false, true)->default(0);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'oauth_clients',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('provider');
|
||||
}
|
||||
);
|
||||
@@ -58,7 +58,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'accounts',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('order');
|
||||
}
|
||||
);
|
||||
@@ -72,7 +72,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('end_date');
|
||||
}
|
||||
);
|
||||
@@ -85,7 +85,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('extension_date');
|
||||
}
|
||||
);
|
||||
@@ -107,7 +107,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'accounts',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->integer('order', false, true)->default(0);
|
||||
}
|
||||
);
|
||||
@@ -121,7 +121,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'oauth_clients',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('provider')->nullable();
|
||||
}
|
||||
);
|
||||
@@ -135,7 +135,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'bills',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->date('end_date')->nullable()->after('date');
|
||||
$table->date('extension_date')->nullable()->after('end_date');
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class ChangesForV540 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'oauth_clients',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('secret', 100)->nullable()->change();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -45,7 +45,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'jobs',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
// straight from Laravel (this is the OLD table)
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue');
|
||||
@@ -69,7 +69,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_transaction_journal',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('budget_id_foreign');
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('period');
|
||||
}
|
||||
);
|
||||
@@ -104,7 +104,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn('generated');
|
||||
}
|
||||
);
|
||||
@@ -134,7 +134,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'jobs',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
@@ -157,7 +157,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'failed_jobs',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
@@ -178,7 +178,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_transaction_journal',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('budget_transaction_journal', 'budget_limit_id')) {
|
||||
$table->integer('budget_limit_id', false, true)->nullable()->default(null)->after('budget_id');
|
||||
$table->foreign('budget_limit_id', 'budget_id_foreign')->references('id')->on('budget_limits')->onDelete('set null');
|
||||
@@ -197,7 +197,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'budget_limits',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('budget_limits', 'period')) {
|
||||
$table->string('period', 12)->nullable();
|
||||
}
|
||||
@@ -216,7 +216,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'webhooks',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -243,7 +243,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'webhook_messages',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -267,7 +267,7 @@ class ChangesForV550 extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'webhook_attempts',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -42,7 +42,7 @@ class ChangesForV550b2 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'recurrences_transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('type_foreign');
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class ChangesForV550b2 extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'recurrences_transactions',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('recurrences_transactions', 'transaction_type_id')) {
|
||||
$table->integer('transaction_type_id', false, true)->nullable()->after('transaction_currency_id');
|
||||
$table->foreign('transaction_type_id', 'type_foreign')->references('id')->on('transaction_types')->onDelete('set null');
|
||||
|
||||
@@ -39,7 +39,7 @@ class AddLdapColumnsToUsersTable extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->dropColumn(['domain']);
|
||||
}
|
||||
);
|
||||
@@ -61,7 +61,7 @@ class AddLdapColumnsToUsersTable extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('domain')->nullable();
|
||||
}
|
||||
);
|
||||
|
||||
@@ -47,7 +47,7 @@ class ExtendCurrencyInfo extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'transaction_currencies',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->string('code', 51)->change();
|
||||
$table->string('symbol', 51)->change();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
$tableName,
|
||||
static function (Blueprint $table) use ($tableName) {
|
||||
static function (Blueprint $table) use ($tableName): void {
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign(sprintf('%s_to_ugi', $tableName));
|
||||
}
|
||||
@@ -83,7 +83,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('type_user_group_id');
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'user_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -136,7 +136,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'user_roles',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -154,7 +154,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::create(
|
||||
'group_memberships',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -177,7 +177,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
'users',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('users', 'user_group_id')) {
|
||||
$table->bigInteger('user_group_id', false, true)->nullable();
|
||||
$table->foreign('user_group_id', 'type_user_group_id')->references('id')->on('user_groups')->onDelete('set null')->onUpdate(
|
||||
@@ -197,7 +197,7 @@ class UserGroups extends Migration
|
||||
try {
|
||||
Schema::table(
|
||||
$tableName,
|
||||
static function (Blueprint $table) use ($tableName) {
|
||||
static function (Blueprint $table) use ($tableName): void {
|
||||
if (!Schema::hasColumn($tableName, 'user_group_id')) {
|
||||
$table->bigInteger('user_group_id', false, true)->nullable()->after('user_id');
|
||||
$table->foreign('user_group_id', sprintf('%s_to_ugi', $tableName))->references('id')->on('user_groups')->onDelete(
|
||||
|
||||
@@ -49,7 +49,7 @@ class CreateLocalPersonalAccessTokensTable extends Migration
|
||||
{
|
||||
if (!Schema::hasTable('personal_access_tokens')) {
|
||||
try {
|
||||
Schema::create('personal_access_tokens', static function (Blueprint $table) {
|
||||
Schema::create('personal_access_tokens', static function (Blueprint $table): void {
|
||||
$table->bigIncrements('id');
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
|
||||
@@ -39,7 +39,7 @@ return new class() extends Migration {
|
||||
try {
|
||||
Schema::table(
|
||||
'currency_exchange_rates',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('currency_exchange_rates', 'user_group_id')) {
|
||||
$table->bigInteger('user_group_id', false, true)->nullable()->after('user_id');
|
||||
$table->foreign('user_group_id', 'cer_to_ugi')->references('id')->on('user_groups')->onDelete('set null')->onUpdate('cascade');
|
||||
@@ -60,7 +60,7 @@ return new class() extends Migration {
|
||||
try {
|
||||
Schema::table(
|
||||
'currency_exchange_rates',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign('cer_to_ugi');
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ return new class() extends Migration {
|
||||
{
|
||||
if (!Schema::hasTable('notifications')) {
|
||||
try {
|
||||
Schema::create('notifications', static function (Blueprint $table) {
|
||||
Schema::create('notifications', static function (Blueprint $table): void {
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('type');
|
||||
$table->morphs('notifiable');
|
||||
|
||||
@@ -37,7 +37,7 @@ return new class() extends Migration {
|
||||
{
|
||||
if (!Schema::hasTable('invited_users')) {
|
||||
try {
|
||||
Schema::create('invited_users', static function (Blueprint $table) {
|
||||
Schema::create('invited_users', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->integer('user_id', false, true);
|
||||
|
||||
@@ -37,7 +37,7 @@ return new class() extends Migration {
|
||||
{
|
||||
if (!Schema::hasTable('audit_log_entries')) {
|
||||
try {
|
||||
Schema::create('audit_log_entries', static function (Blueprint $table) {
|
||||
Schema::create('audit_log_entries', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -39,7 +39,7 @@ return new class() extends Migration {
|
||||
try {
|
||||
Schema::table(
|
||||
'object_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if (!Schema::hasColumn('object_groups', 'user_group_id')) {
|
||||
$table->bigInteger('user_group_id', false, true)->nullable()->after('user_id');
|
||||
$table->foreign('user_group_id', sprintf('%s_to_ugi', 'object_groups'))->references('id')->on('user_groups')->onDelete(
|
||||
@@ -62,7 +62,7 @@ return new class() extends Migration {
|
||||
try {
|
||||
Schema::table(
|
||||
'object_groups',
|
||||
static function (Blueprint $table) {
|
||||
static function (Blueprint $table): void {
|
||||
if ('sqlite' !== config('database.default')) {
|
||||
$table->dropForeign(sprintf('%s_to_ugi', 'object_groups'));
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ return new class() extends Migration {
|
||||
// transaction_currency_user
|
||||
if (!Schema::hasTable('transaction_currency_user')) {
|
||||
try {
|
||||
Schema::create('transaction_currency_user', static function (Blueprint $table) {
|
||||
Schema::create('transaction_currency_user', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->integer('user_id', false, true);
|
||||
@@ -56,7 +56,7 @@ return new class() extends Migration {
|
||||
// transaction_currency_user_group
|
||||
if (!Schema::hasTable('transaction_currency_user_group')) {
|
||||
try {
|
||||
Schema::create('transaction_currency_user_group', static function (Blueprint $table) {
|
||||
Schema::create('transaction_currency_user_group', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->bigInteger('user_group_id', false, true);
|
||||
|
||||
@@ -36,7 +36,7 @@ class UserRoleSeeder extends Seeder
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run()
|
||||
public function run(): void
|
||||
{
|
||||
$roles = [];
|
||||
foreach (UserRoleEnum::cases() as $role) {
|
||||
|
||||
Reference in New Issue
Block a user