-- Script escrito para limpiar las localidades nuevas de Canadá que
-- estaban duplicadas.
USE plocales;
DELETE FROM astro                 WHERE cod_pgeo >= 494072;
DELETE FROM predicciones          WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_1        WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_2        WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_hist     WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_hor      WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_hor_1    WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_hor_2    WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_hor_hist WHERE cod_pgeo >= 494072;
DELETE FROM predicciones_pruebas  WHERE cod_pgeo >= 494072;
DELETE FROM puntos                WHERE cod_pgeo >= 494072;
DELETE FROM resumenes             WHERE cod_pgeo >= 494072;
DELETE FROM resumenes_1           WHERE cod_pgeo >= 494072;
DELETE FROM resumenes_2           WHERE cod_pgeo >= 494072;

--scp delete_puntos_20180115.sql gbv@antartida.ogimet.com:/home/gbv/updates_tablas
--scp insert_puntos_20180115.sql gbv@antartida.ogimet.com:/home/gbv/updates_tablas
--ssh antartida
--cd updates_tablas
--mysql -uroot -p plocales < delete_puntos_20180115.sql
--mysql -uroot -p plocales < insert_puntos_20180115.sql
--su -c "nohup /usr/local/bin/astroloc_masivo 494072 495168 &" gfs
