Changing to database schema to ensure separations of concerns instead of connection string

This commit is contained in:
Jonathan Bourdon
2024-07-06 23:12:39 -04:00
parent ca94dba08d
commit f6a434c440
12 changed files with 211 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ namespace Hutopy.Web.Messages.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Messaging")
.HasAnnotation("ProductVersion", "8.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
@@ -28,9 +29,6 @@ namespace Hutopy.Web.Messages.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("ContentId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("datetime2")
@@ -42,13 +40,16 @@ namespace Hutopy.Web.Messages.Migrations
b.Property<Guid>("ParentId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("SubjectId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Messages");
b.ToTable("Messages", "Messaging");
});
#pragma warning restore 612, 618
}