From 538bb5007a7fc7c562f9a17bc6e98d80c8342886 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Wed, 14 Jan 2015 11:49:44 -0200 Subject: [PATCH] Rename Statistics blocks sooner --- db/migrate/20140724134600_remove_environment_statistics_block_sooner.rb | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) create mode 100644 db/migrate/20140724134600_remove_environment_statistics_block_sooner.rb diff --git a/db/migrate/20140724134600_remove_environment_statistics_block_sooner.rb b/db/migrate/20140724134600_remove_environment_statistics_block_sooner.rb new file mode 100644 index 0000000..96bed70 --- /dev/null +++ b/db/migrate/20140724134600_remove_environment_statistics_block_sooner.rb @@ -0,0 +1,9 @@ +class RemoveEnvironmentStatisticsBlockSooner < ActiveRecord::Migration + def self.up + update("UPDATE blocks SET type = 'StatisticsBlock' WHERE type = 'EnvironmentStatisticsBlock'") + end + + def self.down + say("Nothing to undo (cannot recover the data)") + end +end -- libgit2 0.21.2