Browse Source

Accidentally left the default migration command as rake db:migrate.

Noah Kantrowitz 12 years ago
parent
commit
392c065f12
2 changed files with 3 additions and 1 deletions
  1. 1 1
      libraries/default.rb
  2. 2 0
      providers/rails.rb

+ 1 - 1
libraries/default.rb

@@ -33,7 +33,7 @@ class Chef
         klass.attribute :create_dirs_before_symlink, :kind_of => Array, :default => []
         klass.attribute :symlinks, :kind_of => Hash, :default => {}
         klass.attribute :symlink_before_migrate, :kind_of => Hash, :default => {}
-        klass.attribute :migration_command, :kind_of => [String, NilClass], :default => 'rake db:migrate'
+        klass.attribute :migration_command, :kind_of => [String, NilClass], :default => nil
         klass.attribute :restart_command, :kind_of => [String, NilClass], :default => nil
         klass.attribute :application
         klass.attribute :application_provider

+ 2 - 0
providers/rails.rb

@@ -20,6 +20,8 @@
 
 action :before_compile do
 
+  new_resource.migration_command ||= "rake db:migrate"
+
   new_resource.environment.update({
     "RAILS_ENV" => new_resource.environment_name,
   })