namespace Vrh.iScheduler.Report.Lib.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Update03 : DbMigration
    {
        public override void Up()
        {
            DropIndex("dbo.SchedulerReportPackageItems", "IX_SchedulerReportPackageItems_SchedulerReportPackageId_ReportId_LCID");
            AddColumn("dbo.SchedulerReportPackageItems", "PresetId", c => c.String(nullable: false, maxLength: 50));
            AlterColumn("dbo.SchedulerReportPackageItems", "ExportType", c => c.String(nullable: false, maxLength: 10));
            CreateIndex("dbo.SchedulerReportPackageItems", new[] { "SchedulerReportPackageId", "ReportId", "LCID", "PresetId" }, unique: true, name: "IX_SchedulerReportPackageItems_SchedulerReportPackageId_ReportId_LCID_PresetId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.SchedulerReportPackageItems", "IX_SchedulerReportPackageItems_SchedulerReportPackageId_ReportId_LCID_PresetId");
            AlterColumn("dbo.SchedulerReportPackageItems", "ExportType", c => c.String(nullable: false, maxLength: 30));
            DropColumn("dbo.SchedulerReportPackageItems", "PresetId");
            CreateIndex("dbo.SchedulerReportPackageItems", new[] { "SchedulerReportPackageId", "ReportId", "LCID" }, unique: true, name: "IX_SchedulerReportPackageItems_SchedulerReportPackageId_ReportId_LCID");
        }
    }
}
