Permalink
Browse files

fix first-run migrations

  • Loading branch information...
holman committed Nov 3, 2011
1 parent 91fcda0 commit 552739b1b3760367cb0e74d7c1fbe17ce05ad74b
Showing with 3 additions and 1 deletion.
  1. +3 −1 bin/play
View
@@ -7,8 +7,10 @@ require 'optparse'
# Auto-migrate before launching the servers.
def migrate
version = ActiveRecord::Migrator.current_version
version = 1 if version == 0
ActiveRecord::Base.establish_connection(Play.config['db'])
ActiveRecord::Migrator.migrate("#{File.dirname(__FILE__)}/../db/migrate/", ActiveRecord::Migrator.current_version)
ActiveRecord::Migrator.migrate("#{File.dirname(__FILE__)}/../db/migrate/", version)
end
parser = OptionParser.new do |opts|

0 comments on commit 552739b

Please sign in to comment.