Exception: Suture::Error::SchemaVersion

Inherits:
StandardError
  • Object
show all
Defined in:
lib/suture/error/schema_version.rb

Instance Method Summary collapse

Constructor Details

#initialize(expected, actual) ⇒ SchemaVersion

Returns a new instance of SchemaVersion.



3
4
5
6
# File 'lib/suture/error/schema_version.rb', line 3

def initialize(expected, actual)
  @expected = expected
  @actual = actual
end

Instance Method Details

#messageObject



8
9
10
# File 'lib/suture/error/schema_version.rb', line 8

def message
  "Your suture gem is too #{@expected > @actual ? "new" : "old"} for this schema. Either delete your database or #{@expected > @actual ? "upgrade" : "downgrade"} the gem (expected schema version #{@expected}, was #{@actual})"
end