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

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1403
    {
        public static Version G_VRS_VERSION = new Version("1.4.0.3");
        public static long G_LNG_VERSION = 1403;
        public static int G_INT_TIPO = 0;
        public static string G_STR_SCRIPT =
                                    //AÑADIR campo esAmericano a la tabla HRM_TarifasCabecera
                                    $@"IF not exists 
                                      (
                                        SELECT *
                                            FROM INFORMATION_SCHEMA.COLUMNS
                                            WHERE COLUMN_NAME='esAmericano' AND TABLE_NAME = '{nameof(HRM_TarifasCabecera)}'
                                      )
                                    BEGIN
                                        ALTER TABLE [{nameof(HRM_TarifasCabecera)}] ADD [esAmericano] bigint NULL
                                    END

                                    IF not exists 
                                      (
                                        SELECT *
                                            FROM INFORMATION_SCHEMA.COLUMNS
                                            WHERE COLUMN_NAME='esPremium' AND TABLE_NAME = '{nameof(HRM_TarifasLineas)}'
                                      )
                                    BEGIN
                                        ALTER TABLE [{nameof(HRM_TarifasLineas)}] ADD [esPremium] bigint NULL
                                    END";

    }
}
