From 4335b39f00adb0982af0e4732e18ab8d4026f05d Mon Sep 17 00:00:00 2001 From: Fabio Teixeira Date: Wed, 13 Jan 2016 11:25:38 -0200 Subject: [PATCH] Fix the accentuation on GovernmentalPower and JuridicalNature names --- src/noosfero-spb/gov_user/db/migrate/20160112174948_applies_accentuation_on_models_without_them.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) create mode 100644 src/noosfero-spb/gov_user/db/migrate/20160112174948_applies_accentuation_on_models_without_them.rb diff --git a/src/noosfero-spb/gov_user/db/migrate/20160112174948_applies_accentuation_on_models_without_them.rb b/src/noosfero-spb/gov_user/db/migrate/20160112174948_applies_accentuation_on_models_without_them.rb new file mode 100644 index 0000000..fb8ca6a --- /dev/null +++ b/src/noosfero-spb/gov_user/db/migrate/20160112174948_applies_accentuation_on_models_without_them.rb @@ -0,0 +1,17 @@ +#encoding: utf-8 + +class AppliesAccentuationOnModelsWithoutThem < ActiveRecord::Migration + def up + execute "UPDATE governmental_powers SET name = 'Judiciário' WHERE name = 'Judiciario'" + execute "UPDATE governmental_powers SET name = 'Não se Aplica' WHERE name = 'Nao se Aplica'" + + execute "UPDATE juridical_natures SET name = 'Administração Direta' WHERE name = 'Administracao Direta'" + execute "UPDATE juridical_natures SET name = 'Empresa Pública' WHERE name = 'Empresa Publica'" + execute "UPDATE juridical_natures SET name = 'Fundação' WHERE name = 'Fundacao'" + execute "UPDATE juridical_natures SET name = 'Orgão Autônomo' WHERE name = 'Orgao Autonomo'" + end + + def down + say "This migration has no back state" + end +end -- libgit2 0.21.2