40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Persistence.Database.Postgres.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddChangeLog : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "ChangeLog",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
IdAuthor = table.Column<int>(type: "integer", nullable: false),
|
|
IdEditor = table.Column<int>(type: "integer", nullable: true),
|
|
Creation = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
|
Obsolete = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
|
|
IdNext = table.Column<int>(type: "integer", nullable: true),
|
|
Value = table.Column<object>(type: "jsonb", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ChangeLog", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "ChangeLog");
|
|
}
|
|
}
|
|
}
|