app/sql/lib/migration.rb in volt-sql-0.0.1 vs app/sql/lib/migration.rb in volt-sql-0.0.2
- old
+ new
@@ -1,9 +1,9 @@
# Add database methods for the migration class
module Volt
class Migration
def initialize(db=nil)
- @db = db || Volt.current_app.database.db
+ @db ||= Volt.current_app.database.raw_db
end
def add_column(table_name, column_name, klasses, options={})
sequel_type, sequel_options = Helper.column_type_and_options_for_sequel(klasses, options)
@db.alter_table(table_name) do