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

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1408
    {
        public static Version G_VRS_VERSION = new Version("1.4.0.8");
        public static long G_LNG_VERSION = 1408;
        public static int G_INT_TIPO = 0;
        public static string G_STR_SCRIPT =
                                    //AÑADIR campo esAmericano a la tabla HRM_TarifasCabecera
                                    $@"IF exists 
                                      (
                                        SELECT *
                                            FROM INFORMATION_SCHEMA.COLUMNS
                                            WHERE COLUMN_NAME='importePremium' AND TABLE_NAME = '{nameof(HRM_TarifasLineas)}'
                                      )
                                    ALTER TABLE {nameof(HRM_TarifasLineas)} DROP COLUMN importePremium

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

    }
}
