Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed to use current database schema instead of schema file when dr…

…opping schema
  • Loading branch information...
commit d548e02859cc66e8830e44111247725363231f35 1 parent 04f1943
@gucki authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/sequel_rails3/railtie.rb
View
4 lib/sequel_rails3/railtie.rb
@@ -52,9 +52,7 @@ def self.schema(action)
eval(migration).apply(db, :up)
db[:schema_info].insert(:version => version)
when :down
- migration, version = read_schema
- db_version = db[:schema_info].select(:version).first.try(:[], :version)
- raise RuntimeError, "schema version in schema file (#{version}) differs from version in database (#{db_version})" unless version == db_version
+ migration = db.dump_schema_migration
eval(migration).apply(db, :down)
else
raise ArgumentError, "invalid schema action '#{action}'"
Please sign in to comment.
Something went wrong with that request. Please try again.