2024-11-25 10:05:23 +05:00
|
|
|
|
using System;
|
2024-11-26 14:19:16 +05:00
|
|
|
|
using System.Collections.Generic;
|
2024-11-25 10:05:23 +05:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace Persistence.Database.Postgres.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
2024-11-26 14:19:16 +05:00
|
|
|
|
public partial class Add_ChangeLog : Migration
|
2024-11-25 10:05:23 +05:00
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "ChangeLog",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
2024-11-26 14:19:16 +05:00
|
|
|
|
IdDiscriminator = table.Column<Guid>(type: "uuid", nullable: false),
|
|
|
|
|
IdAuthor = table.Column<Guid>(type: "uuid", nullable: false),
|
|
|
|
|
IdEditor = table.Column<Guid>(type: "uuid", nullable: true),
|
2024-11-25 10:05:23 +05:00
|
|
|
|
Creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
|
|
|
|
Obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
2024-11-26 14:19:16 +05:00
|
|
|
|
IdNext = table.Column<Guid>(type: "uuid", nullable: true),
|
|
|
|
|
DepthStart = table.Column<double>(type: "double precision", nullable: false),
|
|
|
|
|
DepthEnd = table.Column<double>(type: "double precision", nullable: false),
|
|
|
|
|
IdSection = table.Column<Guid>(type: "uuid", nullable: false),
|
|
|
|
|
Value = table.Column<IDictionary<string, object>>(type: "jsonb", nullable: false)
|
2024-11-25 10:05:23 +05:00
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_ChangeLog", x => x.Id);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "ChangeLog");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|