title: Rolling back a migration in Ruby on Rails
body: <p>I am working on my first ruby on rails project, and have created a "Users" table for my app using a "rails generate scaffold users" command.</p>
  
  <p>Now I am trying to undo this statement as I wish to try to rewrite the classes involved with that class and table in my database.</p>
  
  <p>I saw that the scaffold statement created a "def change" class in a migration, and when I try to rollback that migration there is no function within the migration.  I added a "def down" method with only the "drop_table :users" defined within it.</p>
  
  <pre><code>def down
      drop_table :users
  end
  </code></pre>
  
  <p>However, when I run "rake db:rollback", there is no response in the command prompt and the table is unchanged.</p>
  
  <p>I am not quite sure how to undo this migration to rewrite the table schema.  Can anyone offer assistance please?</p>
  
  <p>The whole migration looks like the following:</p>
  
  <pre><code>class CreateUsers &lt; ActiveRecord::Migration
      def change
          create_table :users do |t|
              t.string :name
              t.string :password_digest
              t.string :email
  
              t.timestamps
          end
      end
  
      def down
          drop_table :users
      end
  end
  </code></pre>
  
  <p>EDIT:
  Fixed this by running db:drop and db:rollback to clear my schema.  I think there was an issue with me having the database open in another program.  I closed it and that allowed the database to be rolled back.</p>