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

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1217
    {
        public static Version G_VRS_VERSION = new Version("1.2.1.7");
        public static long G_LNG_VERSION = 1217;
        public static int G_INT_TIPO = 0;
        public static string G_STR_SCRIPT =
                                    //AÑADIR el campo numeroExpedienteSancion a la tabla VTA_Vencimientos
                                    "IF not exists " +
                                      "( " +
                                      "    SELECT * " +
                                      "    FROM INFORMATION_SCHEMA.COLUMNS " +
                                      "    WHERE COLUMN_NAME='numeroExpedienteSancion' AND TABLE_NAME = 'VTA_Vencimientos' " +
                                      ") " +
                                    "BEGIN " +
                                        " ALTER TABLE [VTA_Vencimientos]ADD[numeroExpedienteSancion] varchar(80) NULL " +
                                    "END " +
                                     //BORRAR campo tasa_Sancion a la tabla GTT_Conceptos_Ejercicio
                                     "IF exists " +
                                      "( " +
                                      "    SELECT * " +
                                      "    FROM INFORMATION_SCHEMA.COLUMNS " +
                                      "    WHERE COLUMN_NAME='tasa_Sancion' AND TABLE_NAME = 'GTT_Conceptos_Ejercicio' " +
                                      ") " +
                                    "BEGIN " +
                                        " ALTER TABLE GTT_Conceptos_Ejercicio DROP COLUMN [tasa_Sancion] " +
                                    "END " +
                                     //BORRAR campo textoIncluidoRecibos_Sancion a la tabla GTT_Conceptos_Ejercicio
                                     "IF exists " +
                                      "( " +
                                      "    SELECT * " +
                                      "    FROM INFORMATION_SCHEMA.COLUMNS " +
                                      "    WHERE COLUMN_NAME='textoIncluidoRecibos_Sancion' AND TABLE_NAME = 'GTT_Conceptos_Ejercicio' " +
                                      ") " +
                                    "BEGIN " +
                                        " ALTER TABLE GTT_Conceptos_Ejercicio DROP COLUMN [textoIncluidoRecibos_Sancion] " +
                                    "END ";
            
            
            




    }
}
