lib/lotus/model/migrator.rb in lotus-model-0.5.0 vs lib/lotus/model/migrator.rb in lotus-model-0.5.1
- old
+ new
@@ -6,11 +6,11 @@
module Lotus
module Model
# Migration error
#
# @since 0.4.0
- class MigrationError < ::StandardError
+ class MigrationError < Lotus::Model::Error
end
# Define a migration
#
# It must define an up/down strategy to write schema changes (up) and to
@@ -290,9 +290,11 @@
# @api private
def self.connection
Sequel.connect(
configuration.adapter.uri
)
+ rescue Sequel::AdapterNotFound
+ raise MigrationError.new("Current adapter (#{ configuration.adapter.type }) doesn't support SQL database operations.")
end
# Lotus::Model configuration
#
# @since 0.4.0