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

namespace Exferia_EntityFramework.Script_Actualizacion
{
    class Scripts_Version_1348
    {
        public static Version G_VRS_VERSION = new Version("1.3.4.8");
        public static long G_LNG_VERSION = 1348;
        public static int G_INT_TIPO = 0;
        public static string G_STR_SCRIPT =
                                    //CREAR TABLA SNC_SincronizacionVaciar
                                    " IF not exists " +
                                    " ( " +
                                        " SELECT * " +
                                        " FROM INFORMATION_SCHEMA.TABLES " +
                                        " WHERE TABLE_NAME = 'SNC_SincronizacionVaciar' " +
                                    " ) " +
                                    " BEGIN " +
                                        " CREATE TABLE SNC_SincronizacionVaciar " +
                                        " ( " +
                                            " [idTerminal] [bigint] NOT NULL, " +
                                        " CONSTRAINT[PK_SNC_SincronizacionVaciar] PRIMARY KEY CLUSTERED " +
                                        " ( " +
                                        " [idTerminal] ASC " +
                                        " )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY] " +
                                        " ) ON[PRIMARY] " +
                                        //Relaciones
                                        " ALTER TABLE SNC_SincronizacionVaciar WITH CHECK ADD CONSTRAINT [FK_SNC_SincronizacionVaciar_GEN_Terminales] FOREIGN KEY([idTerminal]) REFERENCES GEN_Terminales ([id]) " +
                                        " ALTER TABLE SNC_SincronizacionVaciar CHECK CONSTRAINT [FK_SNC_SincronizacionVaciar_GEN_Terminales] " +                                      
                                    " END ";
    }
}
