using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DD.Persistence.Database.Postgres.Migrations
{
    /// <inheritdoc />
    public partial class SetpointMigration : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Setpoint",
                columns: table => new
                {
                    Key = table.Column<Guid>(type: "uuid", nullable: false, comment: "Ключ"),
                    Created = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, comment: "Дата изменения уставки"),
                    Value = table.Column<object>(type: "jsonb", nullable: false, comment: "Значение уставки"),
                    IdUser = table.Column<Guid>(type: "uuid", nullable: false, comment: "Id автора последнего изменения")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Setpoint", x => new { x.Key, x.Created });
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Setpoint");
        }
    }
}