55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace JobTrackerApi.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddAutomationRulesAndFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "FeedbackRequestedAt",
|
|
table: "JobApplications",
|
|
type: "TEXT",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "RuleSettings",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "INTEGER", nullable: false),
|
|
AppliedFollowUpDays = table.Column<int>(type: "INTEGER", nullable: false),
|
|
AppliedGhostDays = table.Column<int>(type: "INTEGER", nullable: false),
|
|
OfferFollowUpDays = table.Column<int>(type: "INTEGER", nullable: false),
|
|
OfferGhostDays = table.Column<int>(type: "INTEGER", nullable: false),
|
|
FeedbackFollowUpDays = table.Column<int>(type: "INTEGER", nullable: false),
|
|
FeedbackGhostDays = table.Column<int>(type: "INTEGER", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_RuleSettings", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "RuleSettings",
|
|
columns: new[] { "Id", "AppliedFollowUpDays", "AppliedGhostDays", "OfferFollowUpDays", "OfferGhostDays", "FeedbackFollowUpDays", "FeedbackGhostDays" },
|
|
values: new object[] { 1, 14, 30, 7, 14, 7, 14 });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(name: "RuleSettings");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "FeedbackRequestedAt",
|
|
table: "JobApplications");
|
|
}
|
|
}
|
|
}
|
|
|