Class: SequelData::Migrate::Migration
- Inherits:
-
Object
- Object
- SequelData::Migrate::Migration
- Defined in:
- lib/sequel_data/migrate/migration.rb
Constant Summary collapse
- VALID_DIRECTION =
i[up down].freeze
Class Method Summary collapse
-
.descendants ⇒ Object
Returns the list of Migration descendants.
-
.inherited(base) ⇒ Object
Adds the new migration class to the list of Migration descendants.
Instance Method Summary collapse
Class Method Details
.descendants ⇒ Object
Returns the list of Migration descendants.
9 10 11 |
# File 'lib/sequel_data/migrate/migration.rb', line 9 def self.descendants @descendants ||= [] end |
.inherited(base) ⇒ Object
Adds the new migration class to the list of Migration descendants.
14 15 16 17 |
# File 'lib/sequel_data/migrate/migration.rb', line 14 def self.inherited(base) descendants << base super end |
Instance Method Details
#down ⇒ Object
23 24 25 |
# File 'lib/sequel_data/migrate/migration.rb', line 23 def down raise MigrationError, "No down method defined for migration #{self.class}" end |
#up ⇒ Object
19 20 21 |
# File 'lib/sequel_data/migrate/migration.rb', line 19 def up raise MigrationError, "No up method defined for migration #{self.class}" end |