title: Remove rails model after migration
body: <p>It seems strange to me, that creation of model, running migration, destroying it, and creating again same model reports SQL exception:</p>
  
  <pre><code>project|master ⇒ rails g model name name
        invoke  active_record
        create    db/migrate/20130417185814_create_names.rb
        create    app/models/name.rb
  project|master⚡ ⇒ rake db:migrate
  ==  CreateNames: migrating ====================================================
  -- create_table(:names)
     -&gt; 0.0020s
  ==  CreateNames: migrated (0.0021s) ===========================================
  project|master⚡ ⇒ rails d model name
        invoke  active_record
        remove    db/migrate/20130417185814_create_names.rb
        remove    app/models/name.rb
  project|master⚡ ⇒ rake db:migrate
  project|master⚡ ⇒ rails g model name test
        invoke  active_record
        create    db/migrate/20130417185845_create_names.rb
        create    app/models/name.rb
  project|master⚡ ⇒ rake db:migrate
  ==  CreateNames: migrating ====================================================
  -- create_table(:names)
  rake aborted!
  An error has occurred, this and all later migrations canceled:
  
  SQLite3::SQLException: table "names" already exists: CREATE TABLE "names" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "test" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) /path/project/db/migrate/20130417185845_create_names.rb:3:in `change'
  -- create_table("names", {:force=&gt;true})
     -&gt; 0.0100s
  -- initialize_schema_migrations_table()
     -&gt; 0.0025s
  -- assume_migrated_upto_version(20130417185814, ["/path/project/db/migrate"])
     -&gt; 0.0010s
  You have 1 pending migrations:
    20130417185845 CreateNames
  Run `rake db:migrate` to update your database then try again.
  </code></pre>
  
  <p>Maybe, I doing something wrong? Migration has code for deleting table - does it may be used only for rollback?</p>
  
  <h1>Solution</h1>
  
  <p>Delete model and database table and generate a new one is pretty easy:</p>
  
  <ol>
  <li>Create model: <code>rails g model user name</code></li>
  <li>Do migrations: <code>rake db:migrate</code></li>
  <li>Implement something, suddenly remember that you need to delete model</li>
  <li>Revert specific migration: <code>rake db:migrate:down VERSION=20130417185814</code>, where <code>20130417185814</code> is migration id (can be seen in rake db:migrate:status)</li>
  <li>Remove model: <code>rails d model user</code></li>
  <li>Suddenly remember that you need this model, but with other fields</li>
  <li>Create model: <code>rails g model user email group:references</code></li>
  <li>Successfully migrate database: <code>rake db:migrate</code></li>
  </ol>