using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LiveChat.Migrations { /// public partial class sqlitelocal_migration_918 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Rooms", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), RoomJoinCode = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Rooms", x => x.Id); }); migrationBuilder.CreateTable( name: "RoomChatMessages", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), User = table.Column(type: "TEXT", nullable: true), Message = table.Column(type: "TEXT", nullable: true), RoomId = table.Column(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); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "RoomChatMessages"); migrationBuilder.DropTable( name: "Rooms"); } } }