47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
namespace PARR.DAL.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class tblDistributionPeriodsCreate : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "DistributionPeriods",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Name = table.Column<string>(type: "text", nullable: false),
|
|
Duration = table.Column<TimeSpan>(type: "interval", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_DistributionPeriods", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "DistributionPeriods",
|
|
columns: new[] { "Id", "Duration", "Name" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("0ad2dfdb-3833-46d9-979a-c408b7eadc6c"), new TimeSpan(90, 0, 0, 0, 0), "Каждые 90 дней" },
|
|
{ new Guid("3a7341a8-085c-461c-babc-6b78dd5d2c67"), new TimeSpan(28, 0, 0, 0, 0), "Ежемесячно" }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "DistributionPeriods");
|
|
}
|
|
}
|
|
}
|