using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1260
    {
        public static Version G_VRS_VERSION = new Version("1.2.6.0");
        public static long G_LNG_VERSION = 1260;
        public static int G_INT_TIPO = 0;
        public static string G_STR_SCRIPT =
                                     //BORRAR campo idVendedor a la tabla COM_Vencimientos
                                     "IF exists " +
                                      "( " +
                                      "    SELECT * " +
                                      "    FROM INFORMATION_SCHEMA.COLUMNS " +
                                      "    WHERE COLUMN_NAME='idVendedor' AND TABLE_NAME = 'COM_Vencimientos' " +
                                      ") " +
                                    "BEGIN " +
                                        " ALTER TABLE COM_Vencimientos DROP CONSTRAINT[FK_COM_Vencimientos_MAE_Vendedores] " +
                                        " ALTER TABLE COM_Vencimientos DROP COLUMN [idVendedor] " +
                                    "END " +
                                     //BORRAR campo fechaPrevista a la tabla COM_EntradasMercanciaCabecera
                                     "IF exists " +
                                      "( " +
                                      "    SELECT * " +
                                      "    FROM INFORMATION_SCHEMA.COLUMNS " +
                                      "    WHERE COLUMN_NAME='fechaPrevista' AND TABLE_NAME = 'COM_EntradasMercanciaCabecera' " +
                                      ") " +
                                    "BEGIN " +
                                        " ALTER TABLE COM_EntradasMercanciaCabecera DROP COLUMN [fechaPrevista] " +
                                    "END ";


    }
}
