Skip to content

Commit 7ee94a6

Browse files
Merge pull request #71 from nullinside-development-group/fix/duplicates
fix: duplicate insertion issue
2 parents af876e2 + 65305af commit 7ee94a6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Nullinside.Api.Model/Ddl/TwitchBan.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Microsoft.EntityFrameworkCore;
22

3+
using MySql.EntityFrameworkCore.Extensions;
4+
35
namespace Nullinside.Api.Model.Ddl;
46

57
/// <summary>
@@ -39,6 +41,8 @@ public class TwitchBan : ITableModel {
3941
public void OnModelCreating(ModelBuilder modelBuilder) {
4042
modelBuilder.Entity<TwitchBan>(entity => {
4143
entity.HasKey(e => e.Id);
44+
entity.Property(e => e.Id)
45+
.UseMySQLAutoIncrementColumn("int");
4246
entity.Property(e => e.ChannelId)
4347
.HasMaxLength(255);
4448
entity.Property(e => e.BannedUserTwitchId)

src/Nullinside.Api.Model/Migrations/NullinsideContextModelSnapshot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1616
{
1717
#pragma warning disable 612, 618
1818
modelBuilder
19-
.HasAnnotation("ProductVersion", "8.0.11")
19+
.HasAnnotation("ProductVersion", "8.0.13")
2020
.HasAnnotation("Relational:MaxIdentifierLength", 64);
2121

2222
modelBuilder.Entity("Nullinside.Api.Model.Ddl.DockerDeployments", b =>

0 commit comments

Comments
 (0)