using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
///
public partial class SchedulerClmnsToJob : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Schedulers");
migrationBuilder.AddColumn(
name: "Frequency",
table: "Jobs",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "IsEnabled",
table: "Jobs",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn(
name: "StartAt",
table: "Jobs",
type: "timestamp with time zone",
nullable: false,
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Frequency",
table: "Jobs");
migrationBuilder.DropColumn(
name: "IsEnabled",
table: "Jobs");
migrationBuilder.DropColumn(
name: "StartAt",
table: "Jobs");
migrationBuilder.CreateTable(
name: "Schedulers",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateModified = table.Column(type: "timestamp with time zone", nullable: true),
Frequency = table.Column(type: "integer", nullable: false),
IsEnabled = table.Column(type: "boolean", nullable: false),
Name = table.Column(type: "text", nullable: true),
StartAt = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Schedulers", x => x.Id);
});
}
}
}