using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Modules.Rating.Api.Migrations { /// public partial class Init : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Rates", columns: table => new { ObjectId = table.Column(type: "uuid", nullable: false), SubjectId = table.Column(type: "uuid", nullable: false), RatePercentage = table.Column(type: "integer", nullable: false), LastUpdate = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()"), VoteDate = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "now()") }, constraints: table => { table.PrimaryKey("PK_Rates", x => new { x.SubjectId, x.ObjectId }); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Rates"); } } }