Database migration, repository, controller and service
This commit is contained in:
1 parent
07e4e6b381
commit
4fb8768807
17 files changed
+368
-44
No files matched your search
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PaperlessAI.Models;
|
||||
|
||||
namespace PaperlessAI.Context;
|
||||
|
||||
@@ -19,6 +19,13 @@ public class MyDbContext : DbContext
|
||||
modelBuilder
|
||||
.UseCollation("utf8mb4_uca1400_ai_ci")
|
||||
.HasCharSet("utf8mb4");
|
||||
|
||||
modelBuilder
|
||||
.Entity<PaperlessDocument>()
|
||||
.HasIndex(x => x.DocumentId)
|
||||
.IsUnique();
|
||||
}
|
||||
|
||||
public DbSet<PaperlessDocument> PaperlessDocuments { get; set; }
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user