Commit 538bb5007a7fc7c562f9a17bc6e98d80c8342886

Authored by Antonio Terceiro
1 parent 98bf7a4c

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 @@ @@ -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