Skip to content

Commit

Permalink
Fix migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
holman committed Nov 5, 2011
1 parent ecf6c20 commit 6a84b3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/play
Expand Up @@ -9,8 +9,7 @@ require 'play'
# Returns nothing.
def migrate
puts "Migrating your database"
version = ActiveRecord::Migrator.current_version
version = 1 if version == 0
version = `ls db/migrate | wc -l`.to_i
ActiveRecord::Base.establish_connection(Play.config['db'])
ActiveRecord::Migrator.migrate("#{File.dirname(__FILE__)}/../db/migrate/", version)
end
Expand Down

0 comments on commit 6a84b3c

Please sign in to comment.