mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Rename field for less confusion.
This commit is contained in:
@@ -131,7 +131,7 @@ class TransactionCurrency extends Model
|
||||
*/
|
||||
public function users(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class)->withTimestamps()->withPivot('default');
|
||||
return $this->belongsToMany(User::class)->withTimestamps()->withPivot('user_default');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +141,7 @@ class TransactionCurrency extends Model
|
||||
*/
|
||||
public function userGroups(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(UserGroup::class)->withTimestamps()->withPivot('default');
|
||||
return $this->belongsToMany(UserGroup::class)->withTimestamps()->withPivot('group_default');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -137,7 +137,7 @@ class UserGroup extends Model
|
||||
*/
|
||||
public function currencies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(TransactionCurrency::class);
|
||||
return $this->belongsToMany(TransactionCurrency::class)->withTimestamps()->withPivot('group_default');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -239,7 +239,7 @@ class User extends Authenticatable
|
||||
*/
|
||||
public function currencies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(TransactionCurrency::class)->withTimestamps()->withPivot('default');
|
||||
return $this->belongsToMany(TransactionCurrency::class)->withTimestamps()->withPivot('user_default');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -18,7 +18,7 @@ return new class extends Migration {
|
||||
$table->timestamps();
|
||||
$table->integer('user_id', false, true);
|
||||
$table->integer('transaction_currency_id', false, true);
|
||||
$table->boolean('default')->default(false);
|
||||
$table->boolean('user_default')->default(false);
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
|
||||
$table->unique(['user_id', 'transaction_currency_id'],'unique_combo');
|
||||
@@ -37,7 +37,7 @@ return new class extends Migration {
|
||||
$table->timestamps();
|
||||
$table->bigInteger('user_group_id', false, true);
|
||||
$table->integer('transaction_currency_id', false, true);
|
||||
$table->boolean('default')->default(false);
|
||||
$table->boolean('group_default')->default(false);
|
||||
$table->foreign('user_group_id')->references('id')->on('user_groups')->onDelete('cascade');
|
||||
$table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade');
|
||||
$table->unique(['user_group_id', 'transaction_currency_id'],'unique_combo');
|
||||
|
Reference in New Issue
Block a user