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

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1417
    {
        public static Version G_VRS_VERSION = new Version("1.4.1.7");
        public static long G_LNG_VERSION = 1417;
        public static int G_INT_TIPO = 0;
        public static string G_STR_SCRIPT =
            //CREAR TABLA MAE_Articulos_Fotos
            $@"IF not exists
            (
                SELECT * 
                FROM INFORMATION_SCHEMA.TABLES
                WHERE TABLE_NAME = 'ERP_ValoresGenerales'
            )
            BEGIN
                CREATE TABLE ERP_ValoresGenerales
                (
	                [id] [bigint] IDENTITY(1,1) NOT NULL,
	                [idConfiguracionEmail] [bigint] NOT NULL,
                    CONSTRAINT [PK_ERP_ValoresGenerales] PRIMARY KEY CLUSTERED 
                        ([id] ASC) WITH 
                        (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
                ) ON [PRIMARY]

                ALTER TABLE ERP_ValoresGenerales WITH CHECK ADD  CONSTRAINT [FK_ERP_ValoresGenerales_GEN_ConfiguracionesEmails] FOREIGN KEY([idConfiguracionEmail]) REFERENCES GEN_ConfiguracionesEmails ([id])
                ALTER TABLE ERP_ValoresGenerales CHECK CONSTRAINT [FK_ERP_ValoresGenerales_GEN_ConfiguracionesEmails]
            END";
    }

}
