My project is in the early stages so deleting it and starting over
will be no big deal.
I want to do this because I ran into a couple of problems with
migrations and rollbacks that didn't leave the system in the state I
So, I completely deleted the directory that held the rails project and
did a DROP DATABASE on the development, test and production
databases. Then (I am using postgresql) I did the necessary CREATE
DATABASE commands to recreate the necessary databases and ran a "rails
new timecard -d postgresql" to start the project over. I edited
the .../config/database.yml file to fix the database user name and
Then I (re)created my first migration: "rails generate scaffold
Tc_project project_number:string..." and then I ran the migration with
This did a strange thing: it ran all of the (seemingly deleted)
migrations of the previous instance of the timecard application and
created all of the tables! The problem is, none of the 'scaffold'
commands were executed for any table except the first, Tc_projects,
thus I have no controllers etc. for any of the tables except the
What happened? Only 1 migration file exists in the .../db/migrate/
directory, how and why did rails execute all of the previous
migrations, and, more to the point, how do I stop this from happening?
Thanks in advance for any help. Fred