namespace EgtBEAMWALL.DataLayer.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class LogMachineUpgrade : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.LogMachine", "AlarmCode", c => c.String(unicode: false));
            AddColumn("dbo.LogMachine", "AlarmDtEvent", c => c.DateTime(nullable: false, precision: 0));
            AddColumn("dbo.LogMachine", "AlarmMessage", c => c.String(unicode: false));
            AddColumn("dbo.LogMachine", "AlarmOperation", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "AlarmType", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "CommExecuted", c => c.Boolean(nullable: false));
            AddColumn("dbo.LogMachine", "CommandState", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "CommandType", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "NewOpState", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "ResultType", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "VarAddress", c => c.String(unicode: false));
            AddColumn("dbo.LogMachine", "VarValue", c => c.String(unicode: false));
            DropColumn("dbo.LogMachine", "CncFileName");
            DropColumn("dbo.LogMachine", "DtEvent");
            DropColumn("dbo.LogMachine", "DtExported");
            DropColumn("dbo.LogMachine", "EventType");
            DropColumn("dbo.LogMachine", "MachineId");
            DropColumn("dbo.LogMachine", "Message");
            DropColumn("dbo.LogMachine", "SN");
            DropColumn("dbo.LogMachine", "Value");
        }
        
        public override void Down()
        {
            AddColumn("dbo.LogMachine", "Value", c => c.Double(nullable: false));
            AddColumn("dbo.LogMachine", "SN", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "Message", c => c.String(unicode: false));
            AddColumn("dbo.LogMachine", "MachineId", c => c.String(unicode: false));
            AddColumn("dbo.LogMachine", "EventType", c => c.Int(nullable: false));
            AddColumn("dbo.LogMachine", "DtExported", c => c.DateTime(nullable: false, precision: 0));
            AddColumn("dbo.LogMachine", "DtEvent", c => c.DateTime(nullable: false, precision: 0));
            AddColumn("dbo.LogMachine", "CncFileName", c => c.String(unicode: false));
            DropColumn("dbo.LogMachine", "VarValue");
            DropColumn("dbo.LogMachine", "VarAddress");
            DropColumn("dbo.LogMachine", "ResultType");
            DropColumn("dbo.LogMachine", "NewOpState");
            DropColumn("dbo.LogMachine", "CommandType");
            DropColumn("dbo.LogMachine", "CommandState");
            DropColumn("dbo.LogMachine", "CommExecuted");
            DropColumn("dbo.LogMachine", "AlarmType");
            DropColumn("dbo.LogMachine", "AlarmOperation");
            DropColumn("dbo.LogMachine", "AlarmMessage");
            DropColumn("dbo.LogMachine", "AlarmDtEvent");
            DropColumn("dbo.LogMachine", "AlarmCode");
        }
    }
}
