using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace gehGassi.Persistence.Migrations { /// public partial class FavouritesAdded : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Favourites", columns: table => new { Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), AppUserId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Key = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Table = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Created = table.Column(type: "datetimeoffset", nullable: false), Index = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Version = table.Column(type: "rowversion", rowVersion: true, nullable: true), UpdatedAt = table.Column(type: "datetimeoffset", nullable: false), Deleted = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Favourites", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Ratings_Index", table: "Ratings", column: "Index"); migrationBuilder.CreateIndex( name: "IX_Favourites_Index", table: "Favourites", column: "Index"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Favourites"); migrationBuilder.DropIndex( name: "IX_Ratings_Index", table: "Ratings"); } } }