Class: SeedMigrator::Updater Abstract

Inherits:
Object
  • Object
show all
Includes:
ActiveRecordMigrationCompatible
Defined in:
lib/seed_migrator/updater.rb

Overview

This class is abstract.

The base class for all post-release data updates

Instance Method Summary collapse

Methods included from ActiveRecordMigrationCompatible

#execute

Instance Method Details

#perform_updateObject

Performs the data update. The subclass must override this method.



24
25
26
# File 'lib/seed_migrator/updater.rb', line 24

def perform_update
  raise "#{self.class} should override 'update_data'"
end

#undo_updateObject

Reverses the update. If the update is reversible, this class should be overriden in the subclass.



30
31
32
# File 'lib/seed_migrator/updater.rb', line 30

def undo_update
  raise "#{self.class} does not support rolling back the update"
end