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