-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajusta msip al estandarizado. Closes https://gitlab.com/pasosdeJesus/…
- Loading branch information
Showing
5 changed files
with
120 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
class AjustaUbicacionpre < ActiveRecord::Migration[7.2] | ||
# si_jrscol tenía su propia ubicacionpre | ||
# Se hizo una codificación diferente en msip-2.2 que pasó a msip-2.3 pero | ||
# no se homologo con si_jrscol (en el momento que se basaba en msip-2.2). | ||
# | ||
# Algunas instalaciones de sivel2 quedaron con las ubicacionpre de si_jrscol | ||
# por lo que deben borrarse y usarse las estándares de msip | ||
def up | ||
cu = Msip::Ubicacionpre.all.count | ||
if cu < 79000 | ||
puts "Hay #{cu} registros en ubicacionpre, pero msip tiene 79836" | ||
puts "Se eliminaran la información de ubicacionpre y se importará la semilla de msip. Proceda solo si su sistema no usa ubicacionpre" | ||
puts "Ctrl-D para eliminar registros de ubicacionpre" | ||
puts STDIN.read | ||
puts "Eliminando" | ||
execute <<-SQL | ||
DELETE FROM public.schema_migrations WHERE version='20231205205600'; | ||
DELETE FROM public.msip_ubicacionpre; | ||
SQL | ||
puts "Datos de msip_ubicacionpre eliminados" | ||
puts "Ejecute nuevamente db:migrate para importar semilla de ubicacionpre de msip" | ||
end | ||
end | ||
def down | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.