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

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1416
    {
        public static Version G_VRS_VERSION = new Version("1.4.1.6");
        public static long G_LNG_VERSION = 1416;
        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 = 'VTA_AlbaranesCabecera_Adjuntos'
                                    )
                                    BEGIN
                                        CREATE TABLE VTA_AlbaranesCabecera_Adjuntos
                                        (
                                            [id] [bigint] IDENTITY (1,1) NOT NULL,
                                            [idAlbaranCabecera] [bigint] NOT NULL,
                                            [foto] [varbinary](max) NOT NULL,
                                            [descripcion] [varchar](50) NULL,
                                            [extension][varchar](5) NOT NULL,
                                        CONSTRAINT[PK_VTA_AlbaranesCabecera_Adjuntos] 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 VTA_AlbaranesCabecera_Adjuntos WITH CHECK ADD CONSTRAINT [FK_VTA_AlbaranesCabecera_Adjuntos_VTA_AlbaranCabecera] FOREIGN KEY([idAlbaranCabecera]) REFERENCES VTA_AlbaranesCabecera ([id])
                                        ALTER TABLE VTA_AlbaranesCabecera_Adjuntos CHECK CONSTRAINT [FK_VTA_AlbaranesCabecera_Adjuntos_VTA_AlbaranCabecera]
                                    END";







    }

}
