    IF OBJECT_ID('[dbo].[FK_Op_componentes_lotes_real_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Op_componentes_lotes_real] DROP CONSTRAINT [FK_Op_componentes_lotes_real_Articulos];
    IF OBJECT_ID('[dbo].[FK_Op_lotes_cargados_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Op_lotes_cargados] DROP CONSTRAINT [FK_Op_lotes_cargados_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_maquinas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_maquinas] DROP CONSTRAINT [FK_Articulos_maquinas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_etiquetas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_etiquetas] DROP CONSTRAINT [FK_Articulos_etiquetas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_venta_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Alb_venta_lineas] DROP CONSTRAINT [FK_Alb_venta_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_venta_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Alb_venta_lineas] DROP CONSTRAINT [FK_Alb_venta_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Proyectos_articulos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Proyectos_articulos] DROP CONSTRAINT [FK_Proyectos_articulos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Personas_articulos_articulos]') IS NOT NULL ALTER TABLE [dbo].[Personas_articulos] DROP CONSTRAINT [FK_Personas_articulos_articulos];
    IF OBJECT_ID('[dbo].[FK_Incidencia_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Incidencia] DROP CONSTRAINT [FK_Incidencia_Articulos];
    IF OBJECT_ID('[dbo].[FK_Facturas_simpl_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Facturas_simpl_lineas] DROP CONSTRAINT [FK_Facturas_simpl_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Facturas_simpl_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Facturas_simpl_lineas] DROP CONSTRAINT [FK_Facturas_simpl_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Articulos_codigos_barras_articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_codigos_barras] DROP CONSTRAINT [FK_Articulos_codigos_barras_articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_desc_idioma_Articulo]') IS NOT NULL ALTER TABLE [dbo].[Articulos_desc_idioma] DROP CONSTRAINT [FK_Articulos_desc_idioma_Articulo];
    IF OBJECT_ID('[dbo].[FK_Plantillas_calidad_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Plantillas_calidad] DROP CONSTRAINT [FK_Plantillas_calidad_Articulos];
    IF OBJECT_ID('[dbo].[FK_Art_almazara_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Art_almazara] DROP CONSTRAINT [FK_Art_almazara_Articulos];
    IF OBJECT_ID('[dbo].[FK_Art_bodega_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Art_bodega] DROP CONSTRAINT [FK_Art_bodega_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_referencia_persona_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_referencia_persona] DROP CONSTRAINT [FK_Articulos_referencia_persona_Articulos];
    IF OBJECT_ID('[dbo].[FK_Art_fruta_dulce_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Art_fruta_dulce] DROP CONSTRAINT [FK_Art_fruta_dulce_Articulos];
    IF OBJECT_ID('[dbo].[FK_Art_fruta_seca_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Art_fruta_seca] DROP CONSTRAINT [FK_Art_fruta_seca_Articulos];
    IF OBJECT_ID('[dbo].[FK_Fincas_parcelas_operaciones_articulo]') IS NOT NULL ALTER TABLE [dbo].[Fincas_parcelas_operaciones] DROP CONSTRAINT [FK_Fincas_parcelas_operaciones_articulo];
    IF OBJECT_ID('[dbo].[FK_Art_huerta_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Art_huerta] DROP CONSTRAINT [FK_Art_huerta_Articulos];
    IF OBJECT_ID('[dbo].[FK_Parametros_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Articulos];
    IF OBJECT_ID('[dbo].[FK_Art_suministros_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Art_suministros] DROP CONSTRAINT [FK_Art_suministros_Articulos];
    IF OBJECT_ID('[dbo].[FK_Parametros_Art_auto_prod_aceite]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Art_auto_prod_aceite];
    IF OBJECT_ID('[dbo].[FK_Parametros_Fk_art_principal_prod_aceite]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Fk_art_principal_prod_aceite];
    IF OBJECT_ID('[dbo].[FK_Copages_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Copages_lineas] DROP CONSTRAINT [FK_Copages_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_articulo_envase]') IS NOT NULL ALTER TABLE [dbo].[Articulos] DROP CONSTRAINT [FK_Articulos_articulo_envase];
    IF OBJECT_ID('[dbo].[FK_Almacenes_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Almacenes] DROP CONSTRAINT [FK_Almacenes_Articulos];
    IF OBJECT_ID('[dbo].[FK_Plantilla_precios_liquidacion_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Plantilla_precios_liquidacion] DROP CONSTRAINT [FK_Plantilla_precios_liquidacion_Articulos];
    IF OBJECT_ID('[dbo].[FK_Parametros_ArticulosEnvaseHabitualBigBag]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_ArticulosEnvaseHabitualBigBag];
    IF OBJECT_ID('[dbo].[FK_Contratos_venta_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Contratos_venta_lineas] DROP CONSTRAINT [FK_Contratos_venta_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Contratos_venta_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Contratos_venta_lineas] DROP CONSTRAINT [FK_Contratos_venta_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Lotes_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Lotes] DROP CONSTRAINT [FK_Lotes_Articulos];
    IF OBJECT_ID('[dbo].[FK_Facturas_venta_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Facturas_venta_lineas] DROP CONSTRAINT [FK_Facturas_venta_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Facturas_venta_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Facturas_venta_lineas] DROP CONSTRAINT [FK_Facturas_venta_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Articulos_campos_usuario_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_campos_usuario] DROP CONSTRAINT [FK_Articulos_campos_usuario_Articulos];
    IF OBJECT_ID('[dbo].[FK_Lotes_tratamientos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Lotes_tratamientos] DROP CONSTRAINT [FK_Lotes_tratamientos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_agrupaciones_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_agrupaciones] DROP CONSTRAINT [FK_Articulos_agrupaciones_Articulos];
    IF OBJECT_ID('[dbo].[FK_Precios_campaņas_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Precios_campaņas_lineas] DROP CONSTRAINT [FK_Precios_campaņas_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_imagenes_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_imagenes] DROP CONSTRAINT [FK_Articulos_imagenes_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_impuestos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_impuestos] DROP CONSTRAINT [FK_Articulos_impuestos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_compra_previo_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Alb_compra_previo_lineas] DROP CONSTRAINT [FK_Alb_compra_previo_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Previsiones_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Previsiones_lineas] DROP CONSTRAINT [FK_Previsiones_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_kits_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_kits] DROP CONSTRAINT [FK_Articulos_kits_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_Fk_art_agrup_calc_primas]') IS NOT NULL ALTER TABLE [dbo].[Articulos] DROP CONSTRAINT [FK_Articulos_Fk_art_agrup_calc_primas];
    IF OBJECT_ID('[dbo].[FK_Articulos_kits_hijo_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_kits] DROP CONSTRAINT [FK_Articulos_kits_hijo_Articulos];
    IF OBJECT_ID('[dbo].[FK_Envases_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Envases] DROP CONSTRAINT [FK_Envases_Articulos];
    IF OBJECT_ID('[dbo].[FK_Lotes_variedades_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Lotes_variedades] DROP CONSTRAINT [FK_Lotes_variedades_Articulos];
    IF OBJECT_ID('[dbo].[FK_Primas_articulo_maquina_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Primas_articulo_maquina] DROP CONSTRAINT [FK_Primas_articulo_maquina_Articulos];
    IF OBJECT_ID('[dbo].[FK_Liq_plantillas_lineas_Articulos1]') IS NOT NULL ALTER TABLE [dbo].[Liq_plantillas_lineas] DROP CONSTRAINT [FK_Liq_plantillas_lineas_Articulos1];
    IF OBJECT_ID('[dbo].[FK_Patron_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Patron_lineas] DROP CONSTRAINT [FK_Patron_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Pres_venta_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Pres_venta_lineas] DROP CONSTRAINT [FK_Pres_venta_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Patron_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Patron_lineas] DROP CONSTRAINT [FK_Patron_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Ps_calidad_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ps_calidad] DROP CONSTRAINT [FK_Ps_calidad_Articulos];
    IF OBJECT_ID('[dbo].[FK_Pres_venta_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Pres_venta_lineas] DROP CONSTRAINT [FK_Pres_venta_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Fincas_cultivos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Fincas_cultivos] DROP CONSTRAINT [FK_Fincas_cultivos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Cargas_descargas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Cargas_descargas] DROP CONSTRAINT [FK_Cargas_descargas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Liq_plantillas_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Liq_plantillas_lineas] DROP CONSTRAINT [FK_Liq_plantillas_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Hoja_carga_linea_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Hoja_carga_linea] DROP CONSTRAINT [FK_Hoja_carga_linea_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Safata_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Safata] DROP CONSTRAINT [FK_Safata_Articulos];
    IF OBJECT_ID('[dbo].[FK_Parametros_Articulos_ove_conv]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Articulos_ove_conv];
    IF OBJECT_ID('[dbo].[FK_Ofertas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ofertas] DROP CONSTRAINT [FK_Ofertas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_Fk_articulo_referencia_coste]') IS NOT NULL ALTER TABLE [dbo].[Articulos] DROP CONSTRAINT [FK_Articulos_Fk_articulo_referencia_coste];
    IF OBJECT_ID('[dbo].[FK_Parametros_Articulos_ove_eco]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Articulos_ove_eco];
    IF OBJECT_ID('[dbo].[FK_Archivo_RVC_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Archivo_RVC] DROP CONSTRAINT [FK_Archivo_RVC_Articulos];
    IF OBJECT_ID('[dbo].[FK_Ofertas_lineas_articulo_Ofertas]') IS NOT NULL ALTER TABLE [dbo].[Ofertas_lineas] DROP CONSTRAINT [FK_Ofertas_lineas_articulo_Ofertas];
    IF OBJECT_ID('[dbo].[FK_Ps_calidad_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ps_calidad_lineas] DROP CONSTRAINT [FK_Ps_calidad_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Calidad_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Calidad] DROP CONSTRAINT [FK_Calidad_Articulos];
    IF OBJECT_ID('[dbo].[FK_Escandallo_linea_Articulos_cambio]') IS NOT NULL ALTER TABLE [dbo].[Escandallo_linea] DROP CONSTRAINT [FK_Escandallo_linea_Articulos_cambio];
    IF OBJECT_ID('[dbo].[FK_Alb_liq_lin_Articulos_repartir]') IS NOT NULL ALTER TABLE [dbo].[Alb_liq_lin] DROP CONSTRAINT [FK_Alb_liq_lin_Articulos_repartir];
    IF OBJECT_ID('[dbo].[FK_Pagos_cuenta_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Pagos_cuenta_lineas] DROP CONSTRAINT [FK_Pagos_cuenta_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_Art_agrup_autoconsumo]') IS NOT NULL ALTER TABLE [dbo].[Articulos] DROP CONSTRAINT [FK_Articulos_Art_agrup_autoconsumo];
    IF OBJECT_ID('[dbo].[FK_Tarifas_articulo_persona_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Tarifas_articulo_persona] DROP CONSTRAINT [FK_Tarifas_articulo_persona_Articulos];
    IF OBJECT_ID('[dbo].[FK_Contratos_compra_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Contratos_compra_lineas] DROP CONSTRAINT [FK_Contratos_compra_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Libros_movimientos_Art_agrocoop]') IS NOT NULL ALTER TABLE [dbo].[Libros_movimientos] DROP CONSTRAINT [FK_Libros_movimientos_Art_agrocoop];
    IF OBJECT_ID('[dbo].[FK_Calidad_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Calidad_lineas] DROP CONSTRAINT [FK_Calidad_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Contratos_compra_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Contratos_compra_lineas] DROP CONSTRAINT [FK_Contratos_compra_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos1]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos1];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos2]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos2];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos3]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos3];
    IF OBJECT_ID('[dbo].[FK_Escandallo_oper_comp_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Escandallo_oper_comp] DROP CONSTRAINT [FK_Escandallo_oper_comp_Articulos];
    IF OBJECT_ID('[dbo].[FK_Palets_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Palets] DROP CONSTRAINT [FK_Palets_Articulos];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos4]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos4];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos5]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos5];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos6]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos6];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos7]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos7];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos8]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos8];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos11]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos11];
    IF OBJECT_ID('[dbo].[FK_FT_articulos_Articulos9]') IS NOT NULL ALTER TABLE [dbo].[FT_articulos] DROP CONSTRAINT [FK_FT_articulos_Articulos9];
    IF OBJECT_ID('[dbo].[FK_Ped_compra_lineas_Articulo2]') IS NOT NULL ALTER TABLE [dbo].[Ped_compra_lineas] DROP CONSTRAINT [FK_Ped_compra_lineas_Articulo2];
    IF OBJECT_ID('[dbo].[FK_OP_control_pesos_cabecera_Articulos]') IS NOT NULL ALTER TABLE [dbo].[OP_control_pesos_cabecera] DROP CONSTRAINT [FK_OP_control_pesos_cabecera_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_compra_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Alb_compra_lineas] DROP CONSTRAINT [FK_Alb_compra_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Palets_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Palets_lineas] DROP CONSTRAINT [FK_Palets_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_compra_lineas_Articulo2]') IS NOT NULL ALTER TABLE [dbo].[Alb_compra_lineas] DROP CONSTRAINT [FK_Alb_compra_lineas_Articulo2];
    IF OBJECT_ID('[dbo].[FK_Ped_compra_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ped_compra_lineas] DROP CONSTRAINT [FK_Ped_compra_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_compra_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Alb_compra_lineas] DROP CONSTRAINT [FK_Alb_compra_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Fac_compra_lineas_Articulo2]') IS NOT NULL ALTER TABLE [dbo].[Fac_compra_lineas] DROP CONSTRAINT [FK_Fac_compra_lineas_Articulo2];
    IF OBJECT_ID('[dbo].[FK_Ped_compra_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Ped_compra_lineas] DROP CONSTRAINT [FK_Ped_compra_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Hoja_carga_linea_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Hoja_carga_linea] DROP CONSTRAINT [FK_Hoja_carga_linea_Articulos];
    IF OBJECT_ID('[dbo].[FK_Param_analisi_automatismos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Param_analisi_automatismos] DROP CONSTRAINT [FK_Param_analisi_automatismos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_centros_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_centros] DROP CONSTRAINT [FK_Articulos_centros_Articulos];
    IF OBJECT_ID('[dbo].[FK_Parametros_Articulo_gasoil_bonificado]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Articulo_gasoil_bonificado];
    IF OBJECT_ID('[dbo].[FK_Documentos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Documentacion] DROP CONSTRAINT [FK_Documentos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Dtos_articulo_persona_Dtos_articulo_persona]') IS NOT NULL ALTER TABLE [dbo].[Dtos_articulo_persona] DROP CONSTRAINT [FK_Dtos_articulo_persona_Dtos_articulo_persona];
    IF OBJECT_ID('[dbo].[FK_Inventario_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Inventario_linea] DROP CONSTRAINT [FK_Inventario_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Escandallo_cabecera_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Escandallo_cabecera] DROP CONSTRAINT [FK_Escandallo_cabecera_Articulos];
    IF OBJECT_ID('[dbo].[FK_Escandallo_linea_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Escandallo_linea] DROP CONSTRAINT [FK_Escandallo_linea_Articulos];
    IF OBJECT_ID('[dbo].[FK_Ped_compra_previo_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ped_compra_previo_lineas] DROP CONSTRAINT [FK_Ped_compra_previo_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Op_operaciones_comp_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Op_operaciones_comp] DROP CONSTRAINT [FK_Op_operaciones_comp_Articulos];
    IF OBJECT_ID('[dbo].[FK_Alb_entrada_socios_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Alb_entrada_socios] DROP CONSTRAINT [FK_Alb_entrada_socios_Articulos];
    IF OBJECT_ID('[dbo].[FK_Actualizacion_tarifas_articulo_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Actualizacion_tarifas_articulo] DROP CONSTRAINT [FK_Actualizacion_tarifas_articulo_Articulos];
    IF OBJECT_ID('[dbo].[FK_Docs_firmar_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Docs_firmar] DROP CONSTRAINT [FK_Docs_firmar_Articulos];
    IF OBJECT_ID('[dbo].[FK_Articulos_fk_agrupacion_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Articulos] DROP CONSTRAINT [FK_Articulos_fk_agrupacion_Articulos];
    IF OBJECT_ID('[dbo].[FK_Plantilla_alb_liq_per_sec_camp_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Plantilla_alb_liq_per_sec_camp] DROP CONSTRAINT [FK_Plantilla_alb_liq_per_sec_camp_Articulos];
    IF OBJECT_ID('[dbo].[FK_Inventario_previo_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Inventario_previo_lineas] DROP CONSTRAINT [FK_Inventario_previo_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_alb_liq_lin_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Alb_liq_lin] DROP CONSTRAINT [FK_alb_liq_lin_Articulos];
    IF OBJECT_ID('[dbo].[FK_Libros_movimientos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Libros_movimientos] DROP CONSTRAINT [FK_Libros_movimientos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Liquidaciones_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Liquidaciones_lineas] DROP CONSTRAINT [FK_Liquidaciones_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Dav_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Dav_lineas] DROP CONSTRAINT [FK_Dav_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Ps_calidad_ArticulosEscandallo]') IS NOT NULL ALTER TABLE [dbo].[Ps_calidad] DROP CONSTRAINT [FK_Ps_calidad_ArticulosEscandallo];
    IF OBJECT_ID('[dbo].[FK_Ped_venta_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ped_venta_lineas] DROP CONSTRAINT [FK_Ped_venta_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Ped_venta_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Ped_venta_lineas] DROP CONSTRAINT [FK_Ped_venta_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Movimientos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Movimientos] DROP CONSTRAINT [FK_Movimientos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Traspasos_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Traspasos_lineas] DROP CONSTRAINT [FK_Traspasos_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Movimientos_temporales_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Movimientos_temporales] DROP CONSTRAINT [FK_Movimientos_temporales_Articulos];
    IF OBJECT_ID('[dbo].[FK_Personas_terceros_articulos_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Personas_terceros_articulos] DROP CONSTRAINT [FK_Personas_terceros_articulos_Articulos];
    IF OBJECT_ID('[dbo].[FK_Emcs_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Emcs] DROP CONSTRAINT [FK_Emcs_Articulos];
    IF OBJECT_ID('[dbo].[FK_Parametros_Vd_art_gastos_envio]') IS NOT NULL ALTER TABLE [dbo].[Parametros] DROP CONSTRAINT [FK_Parametros_Vd_art_gastos_envio];
    IF OBJECT_ID('[dbo].[FK_Fac_compra_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Fac_compra_lineas] DROP CONSTRAINT [FK_Fac_compra_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Fac_compra_lineas_ArticulosPadre]') IS NOT NULL ALTER TABLE [dbo].[Fac_compra_lineas] DROP CONSTRAINT [FK_Fac_compra_lineas_ArticulosPadre];
    IF OBJECT_ID('[dbo].[FK_Ped_venta_previo_lineas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Ped_venta_previo_lineas] DROP CONSTRAINT [FK_Ped_venta_previo_lineas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Op_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Op] DROP CONSTRAINT [FK_Op_Articulos];
    IF OBJECT_ID('[dbo].[FK_Fincas_parcelas_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Fincas_parcelas] DROP CONSTRAINT [FK_Fincas_parcelas_Articulos];
    IF OBJECT_ID('[dbo].[FK_Op_Componentes_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Op_Componentes] DROP CONSTRAINT [FK_Op_Componentes_Articulos];
    IF OBJECT_ID('[dbo].[FK_Op_componentes_lotes_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Op_componentes_lotes] DROP CONSTRAINT [FK_Op_componentes_lotes_Articulos];
    IF OBJECT_ID('[dbo].[FK_Lotes_tratamientos_Articulos1]') IS NOT NULL ALTER TABLE [dbo].[Lotes_tratamientos] DROP CONSTRAINT [FK_Lotes_tratamientos_Articulos1];
    IF OBJECT_ID('[dbo].[FK_Copages_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Copages] DROP CONSTRAINT [FK_Copages_Articulos];
    IF OBJECT_ID('[dbo].[FK_Denom_origen_art_Articulos]') IS NOT NULL ALTER TABLE [dbo].[Denom_origen_art] DROP CONSTRAINT [FK_Denom_origen_art_Articulos];
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_14623095_1_4_3_2' AND object_id = OBJECT_ID('[dbo].[Op]')) BEGIN DROP STATISTICS [dbo].[Op].[_dta_stat_14623095_1_4_3_2]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_149575571_12_5' AND object_id = OBJECT_ID('[dbo].[Alb_compra_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_compra_lineas].[_dta_stat_149575571_12_5]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_149575571_5_1_2_3_12' AND object_id = OBJECT_ID('[dbo].[Alb_compra_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_compra_lineas].[_dta_stat_149575571_5_1_2_3_12]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_149575571_5_2_3_7' AND object_id = OBJECT_ID('[dbo].[Alb_compra_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_compra_lineas].[_dta_stat_149575571_5_2_3_7]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_149575571_5_7_2' AND object_id = OBJECT_ID('[dbo].[Alb_compra_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_compra_lineas].[_dta_stat_149575571_5_7_2]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_11_21_9_3_2_13' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_11_21_9_3_2_13]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_21_2_9_3_13' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_21_2_9_3_13]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_21_9' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_21_9]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_3_1_2_21_9_4_11_15_30_24' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_3_1_2_21_9_4_11_15_30_24]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_3_21_9' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_3_21_9]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_3_4_11_15_21_30_24_9_2' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_3_4_11_15_21_30_24_9_2]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_9_2_21_1_3_13_11' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_9_2_21_1_3_13_11]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_2034106287_9_2_3_21' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) BEGIN DROP STATISTICS [dbo].[Movimientos].[_dta_stat_2034106287_9_2_3_21]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_501576825_1_5_2' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_venta_lineas].[_dta_stat_501576825_1_5_2]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_501576825_12_5' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_venta_lineas].[_dta_stat_501576825_12_5]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_501576825_2_3_5' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_venta_lineas].[_dta_stat_501576825_2_3_5]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_501576825_5_1_2_3_12' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_venta_lineas].[_dta_stat_501576825_5_1_2_3_12]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_501576825_5_2' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_venta_lineas].[_dta_stat_501576825_5_2]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_dta_stat_501576825_5_7_2_3' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) BEGIN DROP STATISTICS [dbo].[Alb_venta_lineas].[_dta_stat_501576825_5_7_2_3]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_0000008D_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_0000008D_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_000000BC_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_000000BC_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_000000BE_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_000000BE_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_00000112_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_00000112_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_00000113_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_00000113_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_00000118_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_00000118_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_00000187_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_00000187_13F1F5EB]; END
    IF EXISTS (SELECT 1 FROM sys.stats WHERE name = '_WA_Sys_00000228_13F1F5EB' AND object_id = OBJECT_ID('[dbo].[Parametros]')) BEGIN DROP STATISTICS [dbo].[Parametros].[_WA_Sys_00000228_13F1F5EB]; END
    IF OBJECT_ID('[dbo].[IX_Articulos_centros]') IS NOT NULL ALTER TABLE [dbo].[Articulos_centros] DROP CONSTRAINT [IX_Articulos_centros];
    IF OBJECT_ID('[dbo].[IX_Lotes]') IS NOT NULL ALTER TABLE [dbo].[Lotes] DROP CONSTRAINT [IX_Lotes];
    IF OBJECT_ID('[dbo].[UNIQUE_Articulos_desc_idioma]') IS NOT NULL ALTER TABLE [dbo].[Articulos_desc_idioma] DROP CONSTRAINT [UNIQUE_Articulos_desc_idioma];
    IF OBJECT_ID('[dbo].[UNIQUE_Articulos_referencia_persona]') IS NOT NULL ALTER TABLE [dbo].[Articulos_referencia_persona] DROP CONSTRAINT [UNIQUE_Articulos_referencia_persona];
    IF OBJECT_ID('[dbo].[PK_Art_almazara]') IS NOT NULL ALTER TABLE [dbo].[Art_almazara] DROP CONSTRAINT [PK_Art_almazara];
    IF OBJECT_ID('[dbo].[PK_Art_bodega]') IS NOT NULL ALTER TABLE [dbo].[Art_bodega] DROP CONSTRAINT [PK_Art_bodega];
    IF OBJECT_ID('[dbo].[PK_Art_fruta_dulce]') IS NOT NULL ALTER TABLE [dbo].[Art_fruta_dulce] DROP CONSTRAINT [PK_Art_fruta_dulce];
    IF OBJECT_ID('[dbo].[PK_Art_fruta_seca]') IS NOT NULL ALTER TABLE [dbo].[Art_fruta_seca] DROP CONSTRAINT [PK_Art_fruta_seca];
    IF OBJECT_ID('[dbo].[PK_Art_huerta]') IS NOT NULL ALTER TABLE [dbo].[Art_huerta] DROP CONSTRAINT [PK_Art_huerta];
    IF OBJECT_ID('[dbo].[PK_Art_suministros]') IS NOT NULL ALTER TABLE [dbo].[Art_suministros] DROP CONSTRAINT [PK_Art_suministros];
    IF OBJECT_ID('[dbo].[PK_Articulos_agrupaciones]') IS NOT NULL ALTER TABLE [dbo].[Articulos_agrupaciones] DROP CONSTRAINT [PK_Articulos_agrupaciones];
    IF OBJECT_ID('[dbo].[PK_Articulos_campos_usuario]') IS NOT NULL ALTER TABLE [dbo].[Articulos_campos_usuario] DROP CONSTRAINT [PK_Articulos_campos_usuario];
    IF OBJECT_ID('[dbo].[PK_Articulos_codigos_barras]') IS NOT NULL ALTER TABLE [dbo].[Articulos_codigos_barras] DROP CONSTRAINT [PK_Articulos_codigos_barras];
    IF OBJECT_ID('[dbo].[PK_Articulos_etiquetas]') IS NOT NULL ALTER TABLE [dbo].[Articulos_etiquetas] DROP CONSTRAINT [PK_Articulos_etiquetas];
    IF OBJECT_ID('[dbo].[PK_Articulos_imagenes]') IS NOT NULL ALTER TABLE [dbo].[Articulos_imagenes] DROP CONSTRAINT [PK_Articulos_imagenes];
    IF OBJECT_ID('[dbo].[PK_Articulos_impuestos]') IS NOT NULL ALTER TABLE [dbo].[Articulos_impuestos] DROP CONSTRAINT [PK_Articulos_impuestos];
    IF OBJECT_ID('[dbo].[PK_Articulos_kits]') IS NOT NULL ALTER TABLE [dbo].[Articulos_kits] DROP CONSTRAINT [PK_Articulos_kits];
    IF OBJECT_ID('[dbo].[PK_Personas_articulos]') IS NOT NULL ALTER TABLE [dbo].[Personas_articulos] DROP CONSTRAINT [PK_Personas_articulos];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Alb_compra_lineas_7_149575571__K46_K1_K2_K3_K5_K7_K14' AND object_id = OBJECT_ID('[dbo].[Alb_compra_lineas]')) DROP INDEX [_dta_index_Alb_compra_lineas_7_149575571__K46_K1_K2_K3_K5_K7_K14] ON [dbo].[Alb_compra_lineas];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Alb_venta_lineas_7_501576825__K46_K1_K2_K3_K5_K7_K14' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) DROP INDEX [_dta_index_Alb_venta_lineas_7_501576825__K46_K1_K2_K3_K5_K7_K14] ON [dbo].[Alb_venta_lineas];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Alb_venta_lineas_7_501576825__K7_K1_K2_K3_K5_K14' AND object_id = OBJECT_ID('[dbo].[Alb_venta_lineas]')) DROP INDEX [_dta_index_Alb_venta_lineas_7_501576825__K7_K1_K2_K3_K5_K14] ON [dbo].[Alb_venta_lineas];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Movimientos_7_2034106287__K30_K13_K21_2_9_18' AND object_id = OBJECT_ID('[dbo].[Movimientos]')) DROP INDEX [_dta_index_Movimientos_7_2034106287__K30_K13_K21_2_9_18] ON [dbo].[Movimientos];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Op_7_14623095__K15_K4_K21_K1_5_6' AND object_id = OBJECT_ID('[dbo].[Op]')) DROP INDEX [_dta_index_Op_7_14623095__K15_K4_K21_K1_5_6] ON [dbo].[Op];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Op_Componentes_7_78623323__K2_K3_6' AND object_id = OBJECT_ID('[dbo].[Op_Componentes]')) DROP INDEX [_dta_index_Op_Componentes_7_78623323__K2_K3_6] ON [dbo].[Op_Componentes];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Op_componentes_lotes_real_7_142623551__K3_7_12' AND object_id = OBJECT_ID('[dbo].[Op_componentes_lotes_real]')) DROP INDEX [_dta_index_Op_componentes_lotes_real_7_142623551__K3_7_12] ON [dbo].[Op_componentes_lotes_real];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Ped_venta_lineas_7_910626287__K14_K5_K1_2_3_47' AND object_id = OBJECT_ID('[dbo].[Ped_venta_lineas]')) DROP INDEX [_dta_index_Ped_venta_lineas_7_910626287__K14_K5_K1_2_3_47] ON [dbo].[Ped_venta_lineas];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = '_dta_index_Ped_venta_lineas_7_910626287__K46_K1_K5_K2_K3_K14_47' AND object_id = OBJECT_ID('[dbo].[Ped_venta_lineas]')) DROP INDEX [_dta_index_Ped_venta_lineas_7_910626287__K46_K1_K5_K2_K3_K14_47] ON [dbo].[Ped_venta_lineas];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'IX_Escandallo_cabecera_articulo' AND object_id = OBJECT_ID('[dbo].[Escandallo_cabecera]')) DROP INDEX [IX_Escandallo_cabecera_articulo] ON [dbo].[Escandallo_cabecera];
    IF EXISTS (SELECT 1 FROM sys.indexes WHERE name = 'IX_Lotes_variedades' AND object_id = OBJECT_ID('[dbo].[Lotes_variedades]')) DROP INDEX [IX_Lotes_variedades] ON [dbo].[Lotes_variedades];
    IF OBJECT_ID('[PK_Articulos]') IS NOT NULL ALTER TABLE [Articulos] DROP CONSTRAINT [PK_Articulos];
    ALTER TABLE [Articulos] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Actualizacion_tarifas_articulo] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_compra_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_compra_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_compra_lineas] ALTER COLUMN [Fk_articulo2] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_compra_previo_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Alb_entrada_socios] ALTER COLUMN [Fk_variedad] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_liq_lin] ALTER COLUMN [Articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_liq_lin] ALTER COLUMN [Fk_articulo_repartir] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_venta_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Alb_venta_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Almacenes] ALTER COLUMN [Fk_articulo_envase_asociado] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Archivo_RVC] ALTER COLUMN [Id_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Art_almazara] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Art_bodega] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Art_fruta_dulce] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Art_fruta_seca] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Art_huerta] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Art_suministros] ALTER COLUMN [Codigo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos] ALTER COLUMN [Fk_art_agrup_autoconsumo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos] ALTER COLUMN [Fk_art_agrup_calc_primas] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos] ALTER COLUMN [Fk_articulo_agrupacion] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos] ALTER COLUMN [Fk_articulo_referencia_coste] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos] ALTER COLUMN [Fk_envase] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos_agrupaciones] ALTER COLUMN [Codigo_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_campos_usuario] ALTER COLUMN [fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_centros] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos_codigos_barras] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_desc_idioma] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos_etiquetas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_imagenes] ALTER COLUMN [Articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_impuestos] ALTER COLUMN [Codigo_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_kits] ALTER COLUMN [Articulo_hijo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_kits] ALTER COLUMN [Articulo_kit] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Articulos_maquinas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Articulos_referencia_persona] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Calidad] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Calidad_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Cargas_descargas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Contratos_compra_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Contratos_compra_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Contratos_venta_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Contratos_venta_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Copages] ALTER COLUMN [Fk_articulo_procesar] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Copages_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Dav_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Denom_origen_art] ALTER COLUMN [Fk_Art] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Docs_firmar] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Documentacion] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Dtos_articulo_persona] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Emcs] ALTER COLUMN [Fk_art_partida1] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Envases] ALTER COLUMN [Fk_articulo_asociado] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Escandallo_cabecera] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Escandallo_linea] ALTER COLUMN [Fk_articulo_cambio] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Escandallo_linea] ALTER COLUMN [Fk_articulo_inferior] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Escandallo_oper_comp] ALTER COLUMN [Fk_articulo_operacion] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Fac_compra_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Fac_compra_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Fac_compra_lineas] ALTER COLUMN [Fk_articulo2] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Facturas_simpl_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Facturas_simpl_lineas] ALTER COLUMN [Fk_Articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Facturas_venta_lineas] ALTER COLUMN [Articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Facturas_venta_lineas] ALTER COLUMN [Articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Fincas_cultivos] ALTER COLUMN [Article] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Fincas_parcelas] ALTER COLUMN [Fk_variedad] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Fincas_parcelas_operaciones] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_bozal] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_caja] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_capsula] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_contra] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_envase] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_etiqueta] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_malla] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_palet] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_separador] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[FT_articulos] ALTER COLUMN [Fk_articulo_tapon] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Hoja_carga_linea] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Hoja_carga_linea] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Incidencia] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Inventario_linea] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Inventario_previo_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Libros_movimientos] ALTER COLUMN [Fk_art_agrocoop] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Libros_movimientos] ALTER COLUMN [Fk_variedad] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Liq_plantillas_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Liq_plantillas_lineas] ALTER COLUMN [Fk_articulo_transformacion] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Liquidaciones_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Lotes] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Lotes_tratamientos] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Lotes_tratamientos] ALTER COLUMN [Fk_articulo_tra] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Lotes_variedades] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Movimientos] ALTER COLUMN [Articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Movimientos_temporales] ALTER COLUMN [Articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ofertas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ofertas_lineas] ALTER COLUMN [Fk_articulo_linea] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Op] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Op_Componentes] ALTER COLUMN [Fk_articulo_componente] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Op_componentes_lotes] ALTER COLUMN [Fk_articulo_componente] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Op_componentes_lotes_real] ALTER COLUMN [Fk_articulo_componente] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[OP_control_pesos_cabecera] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Op_lotes_cargados] ALTER COLUMN [Fk_articulo_componente] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Op_operaciones_comp] ALTER COLUMN [Fk_articulo_operacion] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Pagos_cuenta_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Palets] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Palets_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Param_analisi_automatismos] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_art_auto_prod_aceite] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_art_ove_conv] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_art_ove_eco] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_art_principal_prod_aceite] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_articulo_acreedores_generico] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_articulo_envase_habitual_bigbag] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Fk_articulo_gasoil_bonificado] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Parametros] ALTER COLUMN [Vd_art_gastos_envio] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Patron_lineas] ALTER COLUMN [Articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Patron_lineas] ALTER COLUMN [Articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ped_compra_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ped_compra_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ped_compra_lineas] ALTER COLUMN [Fk_articulo2] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ped_compra_previo_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Ped_venta_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ped_venta_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ped_venta_previo_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Personas_articulos] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Personas_terceros_articulos] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Plantilla_alb_liq_per_sec_camp] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Plantilla_precios_liquidacion] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Plantillas_calidad] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Precios_campaņas_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Pres_venta_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Pres_venta_lineas] ALTER COLUMN [Fk_articulo_kit] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Previsiones_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Primas_articulo_maquina] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Proyectos_articulos] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ps_calidad] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ps_calidad] ALTER COLUMN [Fk_articulo_escandallo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Ps_calidad_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Safata] ALTER COLUMN [Fk_articulo_agrocoop] NVARCHAR(22) NULL;
    ALTER TABLE [dbo].[Tarifas_articulo_persona] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NOT NULL;
    ALTER TABLE [dbo].[Traspasos_lineas] ALTER COLUMN [Fk_articulo] NVARCHAR(22) NULL;
    ALTER TABLE [Articulos] ADD CONSTRAINT [PK_Articulos] PRIMARY KEY ([Codigo]);
    CREATE NONCLUSTERED INDEX [_dta_index_Alb_compra_lineas_7_149575571__K46_K1_K2_K3_K5_K7_K14] ON [dbo].[Alb_compra_lineas] ([Id_doc_asociado], [Id], [Serie], [Numero], [Fk_articulo], [No_inventariable], [Cantidad]);
    CREATE NONCLUSTERED INDEX [_dta_index_Alb_venta_lineas_7_501576825__K46_K1_K2_K3_K5_K7_K14] ON [dbo].[Alb_venta_lineas] ([Id_doc_asociado], [Id], [Serie], [Numero], [Fk_articulo], [No_inventariable], [Cantidad]);
    CREATE NONCLUSTERED INDEX [_dta_index_Alb_venta_lineas_7_501576825__K7_K1_K2_K3_K5_K14] ON [dbo].[Alb_venta_lineas] ([No_inventariable], [Id], [Serie], [Numero], [Fk_articulo], [Cantidad]);
    CREATE NONCLUSTERED INDEX [_dta_index_Movimientos_7_2034106287__K30_K13_K21_2_9_18] ON [dbo].[Movimientos] ([Fecha_consolidacion_inventario], [No_inventariable], [Fk_centro]) INCLUDE ([E_S_N], [Articulo], [Cantidad]);
    CREATE NONCLUSTERED INDEX [_dta_index_Op_7_14623095__K15_K4_K21_K1_5_6] ON [dbo].[Op] ([Estado], [Fk_articulo], [Fk_centro], [Id]) INCLUDE ([Cantidad], [Cantidad_real]);
    CREATE NONCLUSTERED INDEX [_dta_index_Op_Componentes_7_78623323__K2_K3_6] ON [dbo].[Op_Componentes] ([Fk_op], [Fk_articulo_componente]) INCLUDE ([Cantidad]);
    CREATE NONCLUSTERED INDEX [_dta_index_Op_componentes_lotes_real_7_142623551__K3_7_12] ON [dbo].[Op_componentes_lotes_real] ([Fk_articulo_componente]) INCLUDE ([Cantidad], [Fk_op]);
    CREATE NONCLUSTERED INDEX [_dta_index_Ped_venta_lineas_7_910626287__K14_K5_K1_2_3_47] ON [dbo].[Ped_venta_lineas] ([Cantidad], [Fk_articulo], [Id]) INCLUDE ([Serie], [Numero], [Cantidad_anulada]);
    CREATE NONCLUSTERED INDEX [_dta_index_Ped_venta_lineas_7_910626287__K46_K1_K5_K2_K3_K14_47] ON [dbo].[Ped_venta_lineas] ([Id_doc_asociado], [Id], [Fk_articulo], [Serie], [Numero], [Cantidad]) INCLUDE ([Cantidad_anulada]);
    CREATE UNIQUE NONCLUSTERED INDEX [IX_Escandallo_cabecera_articulo] ON [dbo].[Escandallo_cabecera] ([Fk_articulo], [Fk_ficha_tecnica], [Fk_centro_habitual], [Tipo]);
    CREATE UNIQUE NONCLUSTERED INDEX [IX_Lotes_variedades] ON [dbo].[Lotes_variedades] ([Fk_id_lote], [Fk_articulo], [Num_eti_desde], [Num_eti_hasta]);
    CREATE STATISTICS [_dta_stat_14623095_1_4_3_2] ON [dbo].[Op] ([Id], [Fk_articulo], [Numero], [Fk_serie]);
    CREATE STATISTICS [_dta_stat_149575571_12_5] ON [dbo].[Alb_compra_lineas] ([Precio_neto], [Fk_articulo]);
    CREATE STATISTICS [_dta_stat_149575571_5_1_2_3_12] ON [dbo].[Alb_compra_lineas] ([Fk_articulo], [Id], [Serie], [Numero], [Precio_neto]);
    CREATE STATISTICS [_dta_stat_149575571_5_2_3_7] ON [dbo].[Alb_compra_lineas] ([Fk_articulo], [Serie], [Numero], [No_inventariable]);
    CREATE STATISTICS [_dta_stat_149575571_5_7_2] ON [dbo].[Alb_compra_lineas] ([Fk_articulo], [No_inventariable], [Serie]);
    CREATE STATISTICS [_dta_stat_2034106287_11_21_9_3_2_13] ON [dbo].[Movimientos] ([Almacen], [Fk_centro], [Articulo], [Fecha_hora], [E_S_N], [No_inventariable]);
    CREATE STATISTICS [_dta_stat_2034106287_21_2_9_3_13] ON [dbo].[Movimientos] ([Fk_centro], [E_S_N], [Articulo], [Fecha_hora], [No_inventariable]);
    CREATE STATISTICS [_dta_stat_2034106287_21_9] ON [dbo].[Movimientos] ([Fk_centro], [Articulo]);
    CREATE STATISTICS [_dta_stat_2034106287_3_1_2_21_9_4_11_15_30_24] ON [dbo].[Movimientos] ([Fecha_hora], [Id], [E_S_N], [Fk_centro], [Articulo], [Fecha_hora_real], [Almacen], [Precio], [Fecha_consolidacion_inventario], [Fecha_cierre_inv]);
    CREATE STATISTICS [_dta_stat_2034106287_3_21_9] ON [dbo].[Movimientos] ([Fecha_hora], [Fk_centro], [Articulo]);
    CREATE STATISTICS [_dta_stat_2034106287_3_4_11_15_21_30_24_9_2] ON [dbo].[Movimientos] ([Fecha_hora], [Fecha_hora_real], [Almacen], [Precio], [Fk_centro], [Fecha_consolidacion_inventario], [Fecha_cierre_inv], [Articulo], [E_S_N]);
    CREATE STATISTICS [_dta_stat_2034106287_9_2_21_1_3_13_11] ON [dbo].[Movimientos] ([Articulo], [E_S_N], [Fk_centro], [Id], [Fecha_hora], [No_inventariable], [Almacen]);
    CREATE STATISTICS [_dta_stat_2034106287_9_2_3_21] ON [dbo].[Movimientos] ([Articulo], [E_S_N], [Fecha_hora], [Fk_centro]);
    CREATE STATISTICS [_dta_stat_501576825_1_5_2] ON [dbo].[Alb_venta_lineas] ([Id], [Fk_articulo], [Serie]);
    CREATE STATISTICS [_dta_stat_501576825_12_5] ON [dbo].[Alb_venta_lineas] ([Precio_neto], [Fk_articulo]);
    CREATE STATISTICS [_dta_stat_501576825_2_3_5] ON [dbo].[Alb_venta_lineas] ([Serie], [Numero], [Fk_articulo]);
    CREATE STATISTICS [_dta_stat_501576825_5_1_2_3_12] ON [dbo].[Alb_venta_lineas] ([Fk_articulo], [Id], [Serie], [Numero], [Precio_neto]);
    CREATE STATISTICS [_dta_stat_501576825_5_2] ON [dbo].[Alb_venta_lineas] ([Fk_articulo], [Serie]);
    CREATE STATISTICS [_dta_stat_501576825_5_7_2_3] ON [dbo].[Alb_venta_lineas] ([Fk_articulo], [No_inventariable], [Serie], [Numero]);
    CREATE STATISTICS [_WA_Sys_0000008D_13F1F5EB] ON [dbo].[Parametros] ([Fk_articulo_acreedores_generico]);
    CREATE STATISTICS [_WA_Sys_000000BC_13F1F5EB] ON [dbo].[Parametros] ([Fk_art_auto_prod_aceite]);
    CREATE STATISTICS [_WA_Sys_000000BE_13F1F5EB] ON [dbo].[Parametros] ([Fk_art_principal_prod_aceite]);
    CREATE STATISTICS [_WA_Sys_00000112_13F1F5EB] ON [dbo].[Parametros] ([Fk_art_ove_conv]);
    CREATE STATISTICS [_WA_Sys_00000113_13F1F5EB] ON [dbo].[Parametros] ([Fk_art_ove_eco]);
    CREATE STATISTICS [_WA_Sys_00000118_13F1F5EB] ON [dbo].[Parametros] ([Fk_articulo_gasoil_bonificado]);
    CREATE STATISTICS [_WA_Sys_00000187_13F1F5EB] ON [dbo].[Parametros] ([Vd_art_gastos_envio]);
    CREATE STATISTICS [_WA_Sys_00000228_13F1F5EB] ON [dbo].[Parametros] ([Fk_articulo_envase_habitual_bigbag]);
    ALTER TABLE [dbo].[Articulos_centros] ADD CONSTRAINT [IX_Articulos_centros] UNIQUE ([Fk_articulo], [Fk_centro]);
    ALTER TABLE [dbo].[Lotes] ADD CONSTRAINT [IX_Lotes] UNIQUE ([Fk_articulo], [Lote]);
    ALTER TABLE [dbo].[Articulos_desc_idioma] ADD CONSTRAINT [UNIQUE_Articulos_desc_idioma] UNIQUE ([Fk_articulo], [Fk_idioma]);
    ALTER TABLE [dbo].[Articulos_referencia_persona] ADD CONSTRAINT [UNIQUE_Articulos_referencia_persona] UNIQUE ([Fk_articulo], [Fk_persona]);
    ALTER TABLE [dbo].[Art_almazara] ADD CONSTRAINT [PK_Art_almazara] PRIMARY KEY CLUSTERED ([Codigo]);
    ALTER TABLE [dbo].[Art_bodega] ADD CONSTRAINT [PK_Art_bodega] PRIMARY KEY CLUSTERED ([Codigo]);
    ALTER TABLE [dbo].[Art_fruta_dulce] ADD CONSTRAINT [PK_Art_fruta_dulce] PRIMARY KEY CLUSTERED ([Codigo]);
    ALTER TABLE [dbo].[Art_fruta_seca] ADD CONSTRAINT [PK_Art_fruta_seca] PRIMARY KEY CLUSTERED ([Codigo]);
    ALTER TABLE [dbo].[Art_huerta] ADD CONSTRAINT [PK_Art_huerta] PRIMARY KEY CLUSTERED ([Codigo]);
    ALTER TABLE [dbo].[Art_suministros] ADD CONSTRAINT [PK_Art_suministros] PRIMARY KEY CLUSTERED ([Codigo]);
    ALTER TABLE [dbo].[Articulos_agrupaciones] ADD CONSTRAINT [PK_Articulos_agrupaciones] PRIMARY KEY CLUSTERED ([Codigo_articulo], [Codigo_grupo]);
    ALTER TABLE [dbo].[Articulos_campos_usuario] ADD CONSTRAINT [PK_Articulos_campos_usuario] PRIMARY KEY CLUSTERED ([fk_articulo], [fk_campo_usuario]);
    ALTER TABLE [dbo].[Articulos_codigos_barras] ADD CONSTRAINT [PK_Articulos_codigos_barras] PRIMARY KEY CLUSTERED ([Codigo], [Fk_articulo]);
    ALTER TABLE [dbo].[Articulos_etiquetas] ADD CONSTRAINT [PK_Articulos_etiquetas] PRIMARY KEY CLUSTERED ([Fk_articulo], [Version]);
    ALTER TABLE [dbo].[Articulos_imagenes] ADD CONSTRAINT [PK_Articulos_imagenes] PRIMARY KEY CLUSTERED ([Articulo]);
    ALTER TABLE [dbo].[Articulos_impuestos] ADD CONSTRAINT [PK_Articulos_impuestos] PRIMARY KEY CLUSTERED ([Codigo_articulo], [Codigo_impuesto]);
    ALTER TABLE [dbo].[Articulos_kits] ADD CONSTRAINT [PK_Articulos_kits] PRIMARY KEY CLUSTERED ([Articulo_kit], [Articulo_hijo]);
    ALTER TABLE [dbo].[Personas_articulos] ADD CONSTRAINT [PK_Personas_articulos] PRIMARY KEY CLUSTERED ([Fk_persona], [Fk_articulo]);
    ALTER TABLE [dbo].[Op_componentes_lotes_real] WITH CHECK ADD CONSTRAINT [FK_Op_componentes_lotes_real_Articulos] FOREIGN KEY([Fk_articulo_componente]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Op_componentes_lotes_real] CHECK CONSTRAINT [FK_Op_componentes_lotes_real_Articulos];
    ALTER TABLE [dbo].[Op_lotes_cargados] WITH CHECK ADD CONSTRAINT [FK_Op_lotes_cargados_Articulos] FOREIGN KEY([Fk_articulo_componente]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Op_lotes_cargados] CHECK CONSTRAINT [FK_Op_lotes_cargados_Articulos];
    ALTER TABLE [dbo].[Articulos_maquinas] WITH CHECK ADD CONSTRAINT [FK_Articulos_maquinas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_maquinas] CHECK CONSTRAINT [FK_Articulos_maquinas_Articulos];
    ALTER TABLE [dbo].[Articulos_etiquetas] WITH CHECK ADD CONSTRAINT [FK_Articulos_etiquetas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_etiquetas] CHECK CONSTRAINT [FK_Articulos_etiquetas_Articulos];
    ALTER TABLE [dbo].[Alb_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Alb_venta_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_venta_lineas] CHECK CONSTRAINT [FK_Alb_venta_lineas_Articulos];
    ALTER TABLE [dbo].[Alb_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Alb_venta_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_venta_lineas] CHECK CONSTRAINT [FK_Alb_venta_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Proyectos_articulos] WITH CHECK ADD CONSTRAINT [FK_Proyectos_articulos_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Proyectos_articulos] CHECK CONSTRAINT [FK_Proyectos_articulos_Articulos];
    ALTER TABLE [dbo].[Personas_articulos] WITH CHECK ADD CONSTRAINT [FK_Personas_articulos_articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Personas_articulos] CHECK CONSTRAINT [FK_Personas_articulos_articulos];
    ALTER TABLE [dbo].[Incidencia] WITH CHECK ADD CONSTRAINT [FK_Incidencia_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Incidencia] CHECK CONSTRAINT [FK_Incidencia_Articulos];
    ALTER TABLE [dbo].[Facturas_simpl_lineas] WITH CHECK ADD CONSTRAINT [FK_Facturas_simpl_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Facturas_simpl_lineas] CHECK CONSTRAINT [FK_Facturas_simpl_lineas_Articulos];
    ALTER TABLE [dbo].[Facturas_simpl_lineas] WITH CHECK ADD CONSTRAINT [FK_Facturas_simpl_lineas_ArticulosPadre] FOREIGN KEY([Fk_Articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Facturas_simpl_lineas] CHECK CONSTRAINT [FK_Facturas_simpl_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Articulos_codigos_barras] WITH CHECK ADD CONSTRAINT [FK_Articulos_codigos_barras_articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_codigos_barras] CHECK CONSTRAINT [FK_Articulos_codigos_barras_articulos];
    ALTER TABLE [dbo].[Articulos_desc_idioma] WITH CHECK ADD CONSTRAINT [FK_Articulos_desc_idioma_Articulo] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_desc_idioma] CHECK CONSTRAINT [FK_Articulos_desc_idioma_Articulo];
    ALTER TABLE [dbo].[Plantillas_calidad] WITH CHECK ADD CONSTRAINT [FK_Plantillas_calidad_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Plantillas_calidad] CHECK CONSTRAINT [FK_Plantillas_calidad_Articulos];
    ALTER TABLE [dbo].[Art_almazara] WITH CHECK ADD CONSTRAINT [FK_Art_almazara_Articulos] FOREIGN KEY([Codigo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Art_almazara] CHECK CONSTRAINT [FK_Art_almazara_Articulos];
    ALTER TABLE [dbo].[Art_bodega] WITH CHECK ADD CONSTRAINT [FK_Art_bodega_Articulos] FOREIGN KEY([Codigo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Art_bodega] CHECK CONSTRAINT [FK_Art_bodega_Articulos];
    ALTER TABLE [dbo].[Articulos_referencia_persona] WITH CHECK ADD CONSTRAINT [FK_Articulos_referencia_persona_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_referencia_persona] CHECK CONSTRAINT [FK_Articulos_referencia_persona_Articulos];
    ALTER TABLE [dbo].[Art_fruta_dulce] WITH CHECK ADD CONSTRAINT [FK_Art_fruta_dulce_Articulos] FOREIGN KEY([Codigo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Art_fruta_dulce] CHECK CONSTRAINT [FK_Art_fruta_dulce_Articulos];
    ALTER TABLE [dbo].[Art_fruta_seca] WITH CHECK ADD CONSTRAINT [FK_Art_fruta_seca_Articulos] FOREIGN KEY([Codigo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Art_fruta_seca] CHECK CONSTRAINT [FK_Art_fruta_seca_Articulos];
    ALTER TABLE [dbo].[Fincas_parcelas_operaciones] WITH CHECK ADD CONSTRAINT [FK_Fincas_parcelas_operaciones_articulo] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Fincas_parcelas_operaciones] CHECK CONSTRAINT [FK_Fincas_parcelas_operaciones_articulo];
    ALTER TABLE [dbo].[Art_huerta] WITH CHECK ADD CONSTRAINT [FK_Art_huerta_Articulos] FOREIGN KEY([Codigo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Art_huerta] CHECK CONSTRAINT [FK_Art_huerta_Articulos];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Articulos] FOREIGN KEY([Fk_articulo_acreedores_generico]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Articulos];
    ALTER TABLE [dbo].[Art_suministros] WITH CHECK ADD CONSTRAINT [FK_Art_suministros_Articulos] FOREIGN KEY([Codigo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Art_suministros] CHECK CONSTRAINT [FK_Art_suministros_Articulos];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Art_auto_prod_aceite] FOREIGN KEY([Fk_art_auto_prod_aceite]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Art_auto_prod_aceite];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Fk_art_principal_prod_aceite] FOREIGN KEY([Fk_art_principal_prod_aceite]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Fk_art_principal_prod_aceite];
    ALTER TABLE [dbo].[Copages_lineas] WITH CHECK ADD CONSTRAINT [FK_Copages_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Copages_lineas] CHECK CONSTRAINT [FK_Copages_lineas_Articulos];
    ALTER TABLE [dbo].[Articulos] WITH CHECK ADD CONSTRAINT [FK_Articulos_articulo_envase] FOREIGN KEY([Fk_envase]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos] CHECK CONSTRAINT [FK_Articulos_articulo_envase];
    ALTER TABLE [dbo].[Almacenes] WITH CHECK ADD CONSTRAINT [FK_Almacenes_Articulos] FOREIGN KEY([Fk_articulo_envase_asociado]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Almacenes] CHECK CONSTRAINT [FK_Almacenes_Articulos];
    ALTER TABLE [dbo].[Plantilla_precios_liquidacion] WITH CHECK ADD CONSTRAINT [FK_Plantilla_precios_liquidacion_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Plantilla_precios_liquidacion] CHECK CONSTRAINT [FK_Plantilla_precios_liquidacion_Articulos];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_ArticulosEnvaseHabitualBigBag] FOREIGN KEY([Fk_articulo_envase_habitual_bigbag]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_ArticulosEnvaseHabitualBigBag];
    ALTER TABLE [dbo].[Contratos_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Contratos_venta_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Contratos_venta_lineas] CHECK CONSTRAINT [FK_Contratos_venta_lineas_Articulos];
    ALTER TABLE [dbo].[Contratos_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Contratos_venta_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Contratos_venta_lineas] CHECK CONSTRAINT [FK_Contratos_venta_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Lotes] WITH CHECK ADD CONSTRAINT [FK_Lotes_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Lotes] CHECK CONSTRAINT [FK_Lotes_Articulos];
    ALTER TABLE [dbo].[Facturas_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Facturas_venta_lineas_Articulos] FOREIGN KEY([Articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Facturas_venta_lineas] CHECK CONSTRAINT [FK_Facturas_venta_lineas_Articulos];
    ALTER TABLE [dbo].[Facturas_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Facturas_venta_lineas_ArticulosPadre] FOREIGN KEY([Articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Facturas_venta_lineas] CHECK CONSTRAINT [FK_Facturas_venta_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Articulos_campos_usuario] WITH CHECK ADD CONSTRAINT [FK_Articulos_campos_usuario_Articulos] FOREIGN KEY([fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_campos_usuario] CHECK CONSTRAINT [FK_Articulos_campos_usuario_Articulos];
    ALTER TABLE [dbo].[Lotes_tratamientos] WITH CHECK ADD CONSTRAINT [FK_Lotes_tratamientos_Articulos] FOREIGN KEY([Fk_articulo_tra]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Lotes_tratamientos] CHECK CONSTRAINT [FK_Lotes_tratamientos_Articulos];
    ALTER TABLE [dbo].[Articulos_agrupaciones] WITH CHECK ADD CONSTRAINT [FK_Articulos_agrupaciones_Articulos] FOREIGN KEY([Codigo_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_agrupaciones] CHECK CONSTRAINT [FK_Articulos_agrupaciones_Articulos];
    ALTER TABLE [dbo].[Precios_campaņas_lineas] WITH CHECK ADD CONSTRAINT [FK_Precios_campaņas_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Precios_campaņas_lineas] CHECK CONSTRAINT [FK_Precios_campaņas_lineas_Articulos];
    ALTER TABLE [dbo].[Articulos_imagenes] WITH CHECK ADD CONSTRAINT [FK_Articulos_imagenes_Articulos] FOREIGN KEY([Articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_imagenes] CHECK CONSTRAINT [FK_Articulos_imagenes_Articulos];
    ALTER TABLE [dbo].[Articulos_impuestos] WITH CHECK ADD CONSTRAINT [FK_Articulos_impuestos_Articulos] FOREIGN KEY([Codigo_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_impuestos] CHECK CONSTRAINT [FK_Articulos_impuestos_Articulos];
    ALTER TABLE [dbo].[Alb_compra_previo_lineas] WITH CHECK ADD CONSTRAINT [FK_Alb_compra_previo_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_compra_previo_lineas] CHECK CONSTRAINT [FK_Alb_compra_previo_lineas_Articulos];
    ALTER TABLE [dbo].[Previsiones_lineas] WITH CHECK ADD CONSTRAINT [FK_Previsiones_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Previsiones_lineas] CHECK CONSTRAINT [FK_Previsiones_lineas_Articulos];
    ALTER TABLE [dbo].[Articulos_kits] WITH CHECK ADD CONSTRAINT [FK_Articulos_kits_Articulos] FOREIGN KEY([Articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_kits] CHECK CONSTRAINT [FK_Articulos_kits_Articulos];
    ALTER TABLE [dbo].[Articulos] WITH CHECK ADD CONSTRAINT [FK_Articulos_Fk_art_agrup_calc_primas] FOREIGN KEY([Fk_art_agrup_calc_primas]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos] CHECK CONSTRAINT [FK_Articulos_Fk_art_agrup_calc_primas];
    ALTER TABLE [dbo].[Articulos_kits] WITH CHECK ADD CONSTRAINT [FK_Articulos_kits_hijo_Articulos] FOREIGN KEY([Articulo_hijo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_kits] CHECK CONSTRAINT [FK_Articulos_kits_hijo_Articulos];
    ALTER TABLE [dbo].[Envases] WITH CHECK ADD CONSTRAINT [FK_Envases_Articulos] FOREIGN KEY([Fk_articulo_asociado]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Envases] CHECK CONSTRAINT [FK_Envases_Articulos];
    ALTER TABLE [dbo].[Lotes_variedades] WITH CHECK ADD CONSTRAINT [FK_Lotes_variedades_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Lotes_variedades] CHECK CONSTRAINT [FK_Lotes_variedades_Articulos];
    ALTER TABLE [dbo].[Primas_articulo_maquina] WITH CHECK ADD CONSTRAINT [FK_Primas_articulo_maquina_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Primas_articulo_maquina] CHECK CONSTRAINT [FK_Primas_articulo_maquina_Articulos];
    ALTER TABLE [dbo].[Liq_plantillas_lineas] WITH CHECK ADD CONSTRAINT [FK_Liq_plantillas_lineas_Articulos1] FOREIGN KEY([Fk_articulo_transformacion]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Liq_plantillas_lineas] CHECK CONSTRAINT [FK_Liq_plantillas_lineas_Articulos1];
    ALTER TABLE [dbo].[Patron_lineas] WITH CHECK ADD CONSTRAINT [FK_Patron_lineas_Articulos] FOREIGN KEY([Articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Patron_lineas] CHECK CONSTRAINT [FK_Patron_lineas_Articulos];
    ALTER TABLE [dbo].[Pres_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Pres_venta_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Pres_venta_lineas] CHECK CONSTRAINT [FK_Pres_venta_lineas_Articulos];
    ALTER TABLE [dbo].[Patron_lineas] WITH CHECK ADD CONSTRAINT [FK_Patron_lineas_ArticulosPadre] FOREIGN KEY([Articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Patron_lineas] CHECK CONSTRAINT [FK_Patron_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Ps_calidad] WITH CHECK ADD CONSTRAINT [FK_Ps_calidad_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ps_calidad] CHECK CONSTRAINT [FK_Ps_calidad_Articulos];
    ALTER TABLE [dbo].[Pres_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Pres_venta_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Pres_venta_lineas] CHECK CONSTRAINT [FK_Pres_venta_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Fincas_cultivos] WITH CHECK ADD CONSTRAINT [FK_Fincas_cultivos_Articulos] FOREIGN KEY([Article]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Fincas_cultivos] CHECK CONSTRAINT [FK_Fincas_cultivos_Articulos];
    ALTER TABLE [dbo].[Cargas_descargas] WITH CHECK ADD CONSTRAINT [FK_Cargas_descargas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Cargas_descargas] CHECK CONSTRAINT [FK_Cargas_descargas_Articulos];
    ALTER TABLE [dbo].[Liq_plantillas_lineas] WITH CHECK ADD CONSTRAINT [FK_Liq_plantillas_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Liq_plantillas_lineas] CHECK CONSTRAINT [FK_Liq_plantillas_lineas_Articulos];
    ALTER TABLE [dbo].[Hoja_carga_linea] WITH CHECK ADD CONSTRAINT [FK_Hoja_carga_linea_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Hoja_carga_linea] CHECK CONSTRAINT [FK_Hoja_carga_linea_ArticulosPadre];
    ALTER TABLE [dbo].[Safata] WITH CHECK ADD CONSTRAINT [FK_Safata_Articulos] FOREIGN KEY([Fk_articulo_agrocoop]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Safata] CHECK CONSTRAINT [FK_Safata_Articulos];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Articulos_ove_conv] FOREIGN KEY([Fk_art_ove_conv]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Articulos_ove_conv];
    ALTER TABLE [dbo].[Ofertas] WITH CHECK ADD CONSTRAINT [FK_Ofertas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ofertas] CHECK CONSTRAINT [FK_Ofertas_Articulos];
    ALTER TABLE [dbo].[Articulos] WITH CHECK ADD CONSTRAINT [FK_Articulos_Fk_articulo_referencia_coste] FOREIGN KEY([Fk_articulo_referencia_coste]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos] CHECK CONSTRAINT [FK_Articulos_Fk_articulo_referencia_coste];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Articulos_ove_eco] FOREIGN KEY([Fk_art_ove_eco]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Articulos_ove_eco];
    ALTER TABLE [dbo].[Archivo_RVC] WITH CHECK ADD CONSTRAINT [FK_Archivo_RVC_Articulos] FOREIGN KEY([Id_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Archivo_RVC] CHECK CONSTRAINT [FK_Archivo_RVC_Articulos];
    ALTER TABLE [dbo].[Ofertas_lineas] WITH CHECK ADD CONSTRAINT [FK_Ofertas_lineas_articulo_Ofertas] FOREIGN KEY([Fk_articulo_linea]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ofertas_lineas] CHECK CONSTRAINT [FK_Ofertas_lineas_articulo_Ofertas];
    ALTER TABLE [dbo].[Ps_calidad_lineas] WITH CHECK ADD CONSTRAINT [FK_Ps_calidad_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ps_calidad_lineas] CHECK CONSTRAINT [FK_Ps_calidad_lineas_Articulos];
    ALTER TABLE [dbo].[Calidad] WITH CHECK ADD CONSTRAINT [FK_Calidad_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Calidad] CHECK CONSTRAINT [FK_Calidad_Articulos];
    ALTER TABLE [dbo].[Escandallo_linea] WITH CHECK ADD CONSTRAINT [FK_Escandallo_linea_Articulos_cambio] FOREIGN KEY([Fk_articulo_cambio]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Escandallo_linea] CHECK CONSTRAINT [FK_Escandallo_linea_Articulos_cambio];
    ALTER TABLE [dbo].[Alb_liq_lin] WITH CHECK ADD CONSTRAINT [FK_Alb_liq_lin_Articulos_repartir] FOREIGN KEY([Fk_articulo_repartir]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_liq_lin] CHECK CONSTRAINT [FK_Alb_liq_lin_Articulos_repartir];
    ALTER TABLE [dbo].[Pagos_cuenta_lineas] WITH CHECK ADD CONSTRAINT [FK_Pagos_cuenta_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Pagos_cuenta_lineas] CHECK CONSTRAINT [FK_Pagos_cuenta_lineas_Articulos];
    ALTER TABLE [dbo].[Articulos] WITH CHECK ADD CONSTRAINT [FK_Articulos_Art_agrup_autoconsumo] FOREIGN KEY([Fk_art_agrup_autoconsumo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos] CHECK CONSTRAINT [FK_Articulos_Art_agrup_autoconsumo];
    ALTER TABLE [dbo].[Tarifas_articulo_persona] WITH CHECK ADD CONSTRAINT [FK_Tarifas_articulo_persona_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Tarifas_articulo_persona] CHECK CONSTRAINT [FK_Tarifas_articulo_persona_Articulos];
    ALTER TABLE [dbo].[Contratos_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Contratos_compra_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Contratos_compra_lineas] CHECK CONSTRAINT [FK_Contratos_compra_lineas_Articulos];
    ALTER TABLE [dbo].[Libros_movimientos] WITH CHECK ADD CONSTRAINT [FK_Libros_movimientos_Art_agrocoop] FOREIGN KEY([Fk_art_agrocoop]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Libros_movimientos] CHECK CONSTRAINT [FK_Libros_movimientos_Art_agrocoop];
    ALTER TABLE [dbo].[Calidad_lineas] WITH CHECK ADD CONSTRAINT [FK_Calidad_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Calidad_lineas] CHECK CONSTRAINT [FK_Calidad_lineas_Articulos];
    ALTER TABLE [dbo].[Contratos_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Contratos_compra_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Contratos_compra_lineas] CHECK CONSTRAINT [FK_Contratos_compra_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos1] FOREIGN KEY([Fk_articulo_caja]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos1];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos2] FOREIGN KEY([Fk_articulo_capsula]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos2];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos3] FOREIGN KEY([Fk_articulo_contra]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos3];
    ALTER TABLE [dbo].[Escandallo_oper_comp] WITH CHECK ADD CONSTRAINT [FK_Escandallo_oper_comp_Articulos] FOREIGN KEY([Fk_articulo_operacion]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Escandallo_oper_comp] CHECK CONSTRAINT [FK_Escandallo_oper_comp_Articulos];
    ALTER TABLE [dbo].[Palets] WITH CHECK ADD CONSTRAINT [FK_Palets_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Palets] CHECK CONSTRAINT [FK_Palets_Articulos];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos4] FOREIGN KEY([Fk_articulo_envase]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos4];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos5] FOREIGN KEY([Fk_articulo_etiqueta]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos5];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos6] FOREIGN KEY([Fk_articulo_malla]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos6];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos7] FOREIGN KEY([Fk_articulo_palet]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos7];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos8] FOREIGN KEY([Fk_articulo_separador]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos8];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos11] FOREIGN KEY([Fk_articulo_bozal]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos11];
    ALTER TABLE [dbo].[FT_articulos] WITH CHECK ADD CONSTRAINT [FK_FT_articulos_Articulos9] FOREIGN KEY([Fk_articulo_tapon]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[FT_articulos] CHECK CONSTRAINT [FK_FT_articulos_Articulos9];
    ALTER TABLE [dbo].[Ped_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_compra_lineas_Articulo2] FOREIGN KEY([Fk_articulo2]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_compra_lineas] CHECK CONSTRAINT [FK_Ped_compra_lineas_Articulo2];
    ALTER TABLE [dbo].[OP_control_pesos_cabecera] WITH CHECK ADD CONSTRAINT [FK_OP_control_pesos_cabecera_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[OP_control_pesos_cabecera] CHECK CONSTRAINT [FK_OP_control_pesos_cabecera_Articulos];
    ALTER TABLE [dbo].[Alb_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Alb_compra_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_compra_lineas] CHECK CONSTRAINT [FK_Alb_compra_lineas_Articulos];
    ALTER TABLE [dbo].[Palets_lineas] WITH CHECK ADD CONSTRAINT [FK_Palets_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Palets_lineas] CHECK CONSTRAINT [FK_Palets_lineas_Articulos];
    ALTER TABLE [dbo].[Alb_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Alb_compra_lineas_Articulo2] FOREIGN KEY([Fk_articulo2]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_compra_lineas] CHECK CONSTRAINT [FK_Alb_compra_lineas_Articulo2];
    ALTER TABLE [dbo].[Ped_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_compra_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_compra_lineas] CHECK CONSTRAINT [FK_Ped_compra_lineas_Articulos];
    ALTER TABLE [dbo].[Alb_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Alb_compra_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_compra_lineas] CHECK CONSTRAINT [FK_Alb_compra_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Fac_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Fac_compra_lineas_Articulo2] FOREIGN KEY([Fk_articulo2]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Fac_compra_lineas] CHECK CONSTRAINT [FK_Fac_compra_lineas_Articulo2];
    ALTER TABLE [dbo].[Ped_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_compra_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_compra_lineas] CHECK CONSTRAINT [FK_Ped_compra_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Hoja_carga_linea] WITH CHECK ADD CONSTRAINT [FK_Hoja_carga_linea_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Hoja_carga_linea] CHECK CONSTRAINT [FK_Hoja_carga_linea_Articulos];
    ALTER TABLE [dbo].[Param_analisi_automatismos] WITH CHECK ADD CONSTRAINT [FK_Param_analisi_automatismos_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Param_analisi_automatismos] CHECK CONSTRAINT [FK_Param_analisi_automatismos_Articulos];
    ALTER TABLE [dbo].[Articulos_centros] WITH CHECK ADD CONSTRAINT [FK_Articulos_centros_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos_centros] CHECK CONSTRAINT [FK_Articulos_centros_Articulos];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Articulo_gasoil_bonificado] FOREIGN KEY([Fk_articulo_gasoil_bonificado]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Articulo_gasoil_bonificado];
    ALTER TABLE [dbo].[Documentacion] WITH CHECK ADD CONSTRAINT [FK_Documentos_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Documentacion] CHECK CONSTRAINT [FK_Documentos_Articulos];
    ALTER TABLE [dbo].[Dtos_articulo_persona] WITH CHECK ADD CONSTRAINT [FK_Dtos_articulo_persona_Dtos_articulo_persona] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Dtos_articulo_persona] CHECK CONSTRAINT [FK_Dtos_articulo_persona_Dtos_articulo_persona];
    ALTER TABLE [dbo].[Inventario_linea] WITH CHECK ADD CONSTRAINT [FK_Inventario_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Inventario_linea] CHECK CONSTRAINT [FK_Inventario_lineas_Articulos];
    ALTER TABLE [dbo].[Escandallo_cabecera] WITH CHECK ADD CONSTRAINT [FK_Escandallo_cabecera_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Escandallo_cabecera] CHECK CONSTRAINT [FK_Escandallo_cabecera_Articulos];
    ALTER TABLE [dbo].[Escandallo_linea] WITH CHECK ADD CONSTRAINT [FK_Escandallo_linea_Articulos] FOREIGN KEY([Fk_articulo_inferior]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Escandallo_linea] CHECK CONSTRAINT [FK_Escandallo_linea_Articulos];
    ALTER TABLE [dbo].[Ped_compra_previo_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_compra_previo_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_compra_previo_lineas] CHECK CONSTRAINT [FK_Ped_compra_previo_lineas_Articulos];
    ALTER TABLE [dbo].[Op_operaciones_comp] WITH CHECK ADD CONSTRAINT [FK_Op_operaciones_comp_Articulos] FOREIGN KEY([Fk_articulo_operacion]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Op_operaciones_comp] CHECK CONSTRAINT [FK_Op_operaciones_comp_Articulos];
    ALTER TABLE [dbo].[Alb_entrada_socios] WITH CHECK ADD CONSTRAINT [FK_Alb_entrada_socios_Articulos] FOREIGN KEY([Fk_variedad]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_entrada_socios] CHECK CONSTRAINT [FK_Alb_entrada_socios_Articulos];
    ALTER TABLE [dbo].[Actualizacion_tarifas_articulo] WITH CHECK ADD CONSTRAINT [FK_Actualizacion_tarifas_articulo_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Actualizacion_tarifas_articulo] CHECK CONSTRAINT [FK_Actualizacion_tarifas_articulo_Articulos];
    ALTER TABLE [dbo].[Docs_firmar] WITH CHECK ADD CONSTRAINT [FK_Docs_firmar_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Docs_firmar] CHECK CONSTRAINT [FK_Docs_firmar_Articulos];
    ALTER TABLE [dbo].[Articulos] WITH CHECK ADD CONSTRAINT [FK_Articulos_fk_agrupacion_Articulos] FOREIGN KEY([Fk_articulo_agrupacion]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Articulos] CHECK CONSTRAINT [FK_Articulos_fk_agrupacion_Articulos];
    ALTER TABLE [dbo].[Plantilla_alb_liq_per_sec_camp] WITH CHECK ADD CONSTRAINT [FK_Plantilla_alb_liq_per_sec_camp_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Plantilla_alb_liq_per_sec_camp] CHECK CONSTRAINT [FK_Plantilla_alb_liq_per_sec_camp_Articulos];
    ALTER TABLE [dbo].[Inventario_previo_lineas] WITH CHECK ADD CONSTRAINT [FK_Inventario_previo_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Inventario_previo_lineas] CHECK CONSTRAINT [FK_Inventario_previo_lineas_Articulos];
    ALTER TABLE [dbo].[Alb_liq_lin] WITH CHECK ADD CONSTRAINT [FK_alb_liq_lin_Articulos] FOREIGN KEY([Articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Alb_liq_lin] CHECK CONSTRAINT [FK_alb_liq_lin_Articulos];
    ALTER TABLE [dbo].[Libros_movimientos] WITH CHECK ADD CONSTRAINT [FK_Libros_movimientos_Articulos] FOREIGN KEY([Fk_variedad]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Libros_movimientos] CHECK CONSTRAINT [FK_Libros_movimientos_Articulos];
    ALTER TABLE [dbo].[Liquidaciones_lineas] WITH CHECK ADD CONSTRAINT [FK_Liquidaciones_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Liquidaciones_lineas] CHECK CONSTRAINT [FK_Liquidaciones_lineas_Articulos];
    ALTER TABLE [dbo].[Dav_lineas] WITH CHECK ADD CONSTRAINT [FK_Dav_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Dav_lineas] CHECK CONSTRAINT [FK_Dav_lineas_Articulos];
    ALTER TABLE [dbo].[Ps_calidad] WITH CHECK ADD CONSTRAINT [FK_Ps_calidad_ArticulosEscandallo] FOREIGN KEY([Fk_articulo_escandallo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ps_calidad] CHECK CONSTRAINT [FK_Ps_calidad_ArticulosEscandallo];
    ALTER TABLE [dbo].[Ped_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_venta_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_venta_lineas] CHECK CONSTRAINT [FK_Ped_venta_lineas_Articulos];
    ALTER TABLE [dbo].[Ped_venta_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_venta_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_venta_lineas] CHECK CONSTRAINT [FK_Ped_venta_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Movimientos] WITH CHECK ADD CONSTRAINT [FK_Movimientos_Articulos] FOREIGN KEY([Articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Movimientos] CHECK CONSTRAINT [FK_Movimientos_Articulos];
    ALTER TABLE [dbo].[Traspasos_lineas] WITH CHECK ADD CONSTRAINT [FK_Traspasos_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Traspasos_lineas] CHECK CONSTRAINT [FK_Traspasos_lineas_Articulos];
    ALTER TABLE [dbo].[Movimientos_temporales] WITH CHECK ADD CONSTRAINT [FK_Movimientos_temporales_Articulos] FOREIGN KEY([Articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Movimientos_temporales] CHECK CONSTRAINT [FK_Movimientos_temporales_Articulos];
    ALTER TABLE [dbo].[Personas_terceros_articulos] WITH CHECK ADD CONSTRAINT [FK_Personas_terceros_articulos_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Personas_terceros_articulos] CHECK CONSTRAINT [FK_Personas_terceros_articulos_Articulos];
    ALTER TABLE [dbo].[Emcs] WITH CHECK ADD CONSTRAINT [FK_Emcs_Articulos] FOREIGN KEY([Fk_art_partida1]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Emcs] CHECK CONSTRAINT [FK_Emcs_Articulos];
    ALTER TABLE [dbo].[Parametros] WITH CHECK ADD CONSTRAINT [FK_Parametros_Vd_art_gastos_envio] FOREIGN KEY([Vd_art_gastos_envio]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Parametros] CHECK CONSTRAINT [FK_Parametros_Vd_art_gastos_envio];
    ALTER TABLE [dbo].[Fac_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Fac_compra_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Fac_compra_lineas] CHECK CONSTRAINT [FK_Fac_compra_lineas_Articulos];
    ALTER TABLE [dbo].[Fac_compra_lineas] WITH CHECK ADD CONSTRAINT [FK_Fac_compra_lineas_ArticulosPadre] FOREIGN KEY([Fk_articulo_kit]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Fac_compra_lineas] CHECK CONSTRAINT [FK_Fac_compra_lineas_ArticulosPadre];
    ALTER TABLE [dbo].[Ped_venta_previo_lineas] WITH CHECK ADD CONSTRAINT [FK_Ped_venta_previo_lineas_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Ped_venta_previo_lineas] CHECK CONSTRAINT [FK_Ped_venta_previo_lineas_Articulos];
    ALTER TABLE [dbo].[Op] WITH CHECK ADD CONSTRAINT [FK_Op_Articulos] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Op] CHECK CONSTRAINT [FK_Op_Articulos];
    ALTER TABLE [dbo].[Fincas_parcelas] WITH CHECK ADD CONSTRAINT [FK_Fincas_parcelas_Articulos] FOREIGN KEY([Fk_variedad]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Fincas_parcelas] CHECK CONSTRAINT [FK_Fincas_parcelas_Articulos];
    ALTER TABLE [dbo].[Op_Componentes] WITH CHECK ADD CONSTRAINT [FK_Op_Componentes_Articulos] FOREIGN KEY([Fk_articulo_componente]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Op_Componentes] CHECK CONSTRAINT [FK_Op_Componentes_Articulos];
    ALTER TABLE [dbo].[Op_componentes_lotes] WITH CHECK ADD CONSTRAINT [FK_Op_componentes_lotes_Articulos] FOREIGN KEY([Fk_articulo_componente]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Op_componentes_lotes] CHECK CONSTRAINT [FK_Op_componentes_lotes_Articulos];
    ALTER TABLE [dbo].[Lotes_tratamientos] WITH CHECK ADD CONSTRAINT [FK_Lotes_tratamientos_Articulos1] FOREIGN KEY([Fk_articulo]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Lotes_tratamientos] CHECK CONSTRAINT [FK_Lotes_tratamientos_Articulos1];
    ALTER TABLE [dbo].[Copages] WITH CHECK ADD CONSTRAINT [FK_Copages_Articulos] FOREIGN KEY([Fk_articulo_procesar]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Copages] CHECK CONSTRAINT [FK_Copages_Articulos];
    ALTER TABLE [dbo].[Denom_origen_art] WITH CHECK ADD CONSTRAINT [FK_Denom_origen_art_Articulos] FOREIGN KEY([Fk_Art]) REFERENCES [Articulos] ([Codigo]);
    ALTER TABLE [dbo].[Denom_origen_art] CHECK CONSTRAINT [FK_Denom_origen_art_Articulos];

