Permalink
Browse files

Merged pusewicz reset task.

  • Loading branch information...
1 parent df886e5 commit 4b852cefc676609f8eee08e3585134b4d602f2d8 @pk pk committed Feb 17, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 merb_sequel/lib/merb_sequel/merbtasks.rb
@@ -14,6 +14,12 @@
Sequel::Migrator.apply(Sequel::Model.db, "schema/migrations", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
end
+ desc "Drop all tables and perform migrations"
+ task :reset => :sequel_env do
+ Sequel::Model.db.drop_table *Sequel::Model.db.tables
+ Sequel::Migrator.apply(Sequel::Model.db, "schema/migrations", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
+ end
+
desc "Truncate all tables in database"
task :truncate => :sequel_env do
db = Sequel::Model.db

0 comments on commit 4b852ce

Please sign in to comment.