Class: GeoserverMigration
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- GeoserverMigration
- Defined in:
- app/models/geoserver_migration.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all_versions ⇒ Object
5 6 7 |
# File 'app/models/geoserver_migration.rb', line 5 def self.all_versions order(:version).pluck(:version) end |
.set_migrated(migration) ⇒ Object
9 10 11 |
# File 'app/models/geoserver_migration.rb', line 9 def self.set_migrated(migration) self.create!(version: migration.version.to_s) end |
.set_reverted(migration) ⇒ Object
13 14 15 |
# File 'app/models/geoserver_migration.rb', line 13 def self.set_reverted(migration) self.where(version: migration.version.to_s).destroy_all end |
Instance Method Details
#version ⇒ Object
17 18 19 |
# File 'app/models/geoserver_migration.rb', line 17 def version super.to_i end |