d076f4e98d
Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz> Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/11
75 lines
2.4 KiB
C#
75 lines
2.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Tnsu.ApprovalRoute.Infrastructure.Persistence.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddSlaSettings : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "ask_overdue_reason",
|
|
table: "template_route_steps",
|
|
type: "boolean",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "sla_hours",
|
|
table: "template_route_steps",
|
|
type: "integer",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "ask_overdue_reason",
|
|
table: "request_types",
|
|
type: "boolean",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "sla_hours",
|
|
table: "request_types",
|
|
type: "integer",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "settings",
|
|
columns: table => new
|
|
{
|
|
option_name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
|
|
file_data = table.Column<byte[]>(type: "bytea", nullable: true),
|
|
value = table.Column<string>(type: "text", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("pk_settings", x => x.option_name);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "settings");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ask_overdue_reason",
|
|
table: "template_route_steps");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "sla_hours",
|
|
table: "template_route_steps");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ask_overdue_reason",
|
|
table: "request_types");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "sla_hours",
|
|
table: "request_types");
|
|
}
|
|
}
|
|
}
|