using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace gehGassi.Persistence.Migrations { public partial class RatingsAdded : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Ratings", columns: table => new { Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), FromId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), FromType = table.Column(type: "int", nullable: false), TargetId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), TargetType = table.Column(type: "int", nullable: false), Points = table.Column(type: "decimal(18,2)", nullable: false), Info = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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_Ratings", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Ratings"); } } }