ahh shit
This commit is contained in:
91
Migrations/20230526180433_sqlite.local_migration_189.Designer.cs
generated
Normal file
91
Migrations/20230526180433_sqlite.local_migration_189.Designer.cs
generated
Normal file
@@ -0,0 +1,91 @@
|
||||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiveChat.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChattingContext))]
|
||||
[Migration("20230526180433_sqlite.local_migration_189")]
|
||||
partial class sqlitelocal_migration_189
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.4");
|
||||
|
||||
modelBuilder.Entity("ChatMessage", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("User")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Room", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RoomJoinCode")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Rooms");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RoomChatMessage", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RoomId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("User")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoomId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("RoomChatMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RoomChatMessage", b =>
|
||||
{
|
||||
b.HasOne("Room", "Room")
|
||||
.WithOne("RoomChatMessage")
|
||||
.HasForeignKey("RoomChatMessage", "RoomId");
|
||||
|
||||
b.Navigation("Room");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Room", b =>
|
||||
{
|
||||
b.Navigation("RoomChatMessage");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Migrations/20230526180433_sqlite.local_migration_189.cs
Normal file
61
Migrations/20230526180433_sqlite.local_migration_189.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiveChat.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class sqlitelocal_migration_189 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Rooms",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "TEXT", nullable: false),
|
||||
RoomJoinCode = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Rooms", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RoomChatMessages",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<string>(type: "TEXT", nullable: false),
|
||||
User = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Message = table.Column<string>(type: "TEXT", nullable: true),
|
||||
RoomId = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RoomChatMessages", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RoomChatMessages_Rooms_RoomId",
|
||||
column: x => x.RoomId,
|
||||
principalTable: "Rooms",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RoomChatMessages_RoomId",
|
||||
table: "RoomChatMessages",
|
||||
column: "RoomId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "RoomChatMessages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Rooms");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,57 @@ namespace LiveChat.Migrations
|
||||
|
||||
b.ToTable("Messages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Room", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RoomJoinCode")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Rooms");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RoomChatMessage", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("RoomId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("User")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RoomId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("RoomChatMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("RoomChatMessage", b =>
|
||||
{
|
||||
b.HasOne("Room", "Room")
|
||||
.WithOne("RoomChatMessage")
|
||||
.HasForeignKey("RoomChatMessage", "RoomId");
|
||||
|
||||
b.Navigation("Room");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Room", b =>
|
||||
{
|
||||
b.Navigation("RoomChatMessage");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user