Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Valour/Database/Economy/Currency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ public class Currency : ISharedCurrency
/// Column to protect from concurrency errors
/// </summary>
[Timestamp]
[NotMapped]
public uint RowVersion { get; set; }
}
1 change: 1 addition & 0 deletions Valour/Database/Economy/EcoAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ public class EcoAccount : ISharedEcoAccount
/// The RowVersion column prevents concurrency issues when updating the database
/// </summary>
[Timestamp]
[NotMapped]
public uint RowVersion { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ CREATE TABLE IF NOT EXISTS currencies (
short_code text,
symbol text,
issued bigint NOT NULL,
decimal_places integer NOT NULL,
xmin xid NOT NULL
decimal_places integer NOT NULL
);

CREATE TABLE IF NOT EXISTS node_stats (
Expand Down Expand Up @@ -414,8 +413,7 @@ CREATE TABLE IF NOT EXISTS eco_accounts (
planet_id bigint NOT NULL,
planet_member_id bigint,
currency_id bigint NOT NULL,
balance_value numeric NOT NULL,
xmin xid NOT NULL
balance_value numeric NOT NULL
);

CREATE TABLE IF NOT EXISTS messages (
Expand Down
12 changes: 0 additions & 12 deletions Valour/Database/Migrations/ValourDbModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("text")
.HasColumnName("plural_name");

b.Property<uint>("RowVersion")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("xid")
.HasColumnName("xmin");

b.Property<string>("ShortCode")
.HasColumnType("text")
.HasColumnName("short_code");
Expand Down Expand Up @@ -504,12 +498,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("bigint")
.HasColumnName("planet_member_id");

b.Property<uint>("RowVersion")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("xid")
.HasColumnName("xmin");

b.Property<long>("UserId")
.HasColumnType("bigint")
.HasColumnName("user_id");
Expand Down