title: rails 5 unable to deploy with capistrano
body: <p>I went and made some changes to my database and models. now when I run: </p>
  
  <pre><code>cap production deploy
  </code></pre>
  
  <p>I get an error: </p>
  
  <pre><code>PG::DuplicateTable: ERROR:  relation "ideas" already exists
  </code></pre>
  
  <p>If this were on my local computer I would just reset the db:</p>
  
  <pre><code>rails db:migrate:reset
  </code></pre>
  
  <p>but since I am using capistrano I don't really know what cap task would help here? If there is one?</p>
  
  <p>I did attempt to use the capistrano-rails-collection gem which has a method</p>
  
  <pre><code>cap production rails:rake:db:reset
  </code></pre>
  
  <p>Rails 5 made changes to what you can run in a production environment. So now I get an error like this.</p>
  
  <pre><code>  01 rake aborted!
    01 ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
    01 If you are sure you want to continue, run the same command with the environment variable:
    01 DISABLE_DATABASE_ENVIRONMENT_CHECK=1
  </code></pre>
  
  <p>I am not clear on how I would run cap with an environment variable so either I need a way to fix the initial error from the deploy command or I need to know how to run a cap task with this environment variable set. Open to other options though.</p>