using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JobTrackerApi.Migrations
{
///
public partial class AddAutomationRulesAndFields : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "FeedbackRequestedAt",
table: "JobApplications",
type: "TEXT",
nullable: true);
migrationBuilder.CreateTable(
name: "RuleSettings",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false),
AppliedFollowUpDays = table.Column(type: "INTEGER", nullable: false),
AppliedGhostDays = table.Column(type: "INTEGER", nullable: false),
OfferFollowUpDays = table.Column(type: "INTEGER", nullable: false),
OfferGhostDays = table.Column(type: "INTEGER", nullable: false),
FeedbackFollowUpDays = table.Column(type: "INTEGER", nullable: false),
FeedbackGhostDays = table.Column(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 });
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(name: "RuleSettings");
migrationBuilder.DropColumn(
name: "FeedbackRequestedAt",
table: "JobApplications");
}
}
}