I am not sure if this is an error or really deleted the migration.rb file. I used generate to create the following migration:
$ rails generate migration add_delta_to_submissions
invoke active_record create db/migrate/20111020175649_add_delta_to_submissions.rb
Then I realized that I neglected to include any columns, so I used the UP ARROW in the console and overwrite the generate with destroy:
$ rails destroy migration add_delta_to_submissions
invoke active_record remove db/migrate/20111020175649_add_delta_to_submissions.rb
So far so good, now it's time to start the migration with the desired column. Here's the problem: I used UP ARROW again - but only once - and added my column info:
$ rails destroy migration add_delta_to_submissions delta:integer
invoke active_record remove migration.rb
I understand that I probably should NOT use UP ARROW for commands as volatile as GENERATE and DESTROY (lessons learned!), But this command returned with a message about deleting the migration.rb file. I did not even know that the mig.rb file is especially not one that can be easily deleted.
For the punches, I decided to try and trick the command console by adding the letter x to the end of the word wrap and receiving this message:
$ rails destroy migrationx add_delta_to_submissions delta:integer
Could not find generator migrationx.
So, I think there might be a bug with the rails destroy command. As soon as he realized that the add_delta_to_submissions.rb file was no longer there, he simply deleted it and attached it on .rb to the word wrap (or any word after DESTROY). It seems a little dangerous ....
Regardless, Iām interested to know how I somehow compromised the RAILS environment (rails 3.1, ruby āā1.8.7) when the migration.rb file was deleted. If so, what are my options for rectifying this situation?
Thank you very much in advance...