Commit cef52439626bb9d029cf77855288a3b25ee4385e

Authored by Antonio Terceiro
1 parent 09087cd0

Rename Statistics blocks sooner

When upgrading from 0.47, 20140724134601_fix_yaml_encoding.rb will run
before 20140827191326_remove_environment_statistics_block.rb and crash
because the EnvironmentStatisticsBlock class does not exist anymore.
db/migrate/20140724134600_remove_environment_statistics_block_sooner.rb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +class RemoveEnvironmentStatisticsBlockSooner < ActiveRecord::Migration
  2 + def self.up
  3 + update("UPDATE blocks SET type = 'StatisticsBlock' WHERE type = 'EnvironmentStatisticsBlock'")
  4 + end
  5 +
  6 + def self.down
  7 + say("Nothing to undo (cannot recover the data)")
  8 + end
  9 +end
... ...