i am new to rails and trying to understand the migrate feature of rake
whenever I call “rake migrate”, i understand it call all the latest
version of a given of given migrate files.
Now when these files are executed, id the #down method called and then
the #up ? or must i explicitly call the #down method from rake. If yes
how do i do that from rake ?
I experimented with rake migrate and could not update my database table
i.e. chage a field from varchar(200) to varchar(200). i had to resort to
the console commands appended (see below) for it to work.
Also say I have migration scripts of different versions say for table1
it is version 5, table 7 version 4 etc
if I run rake migrate will it run both v5 for both tables or will it run
v4 for one and v5 for the other ? This is still not clear to me…
Loading development environment.
== TestMigration: reverting
== TestMigration: reverted (0.0900s)
== TestMigration: migrating
== TestMigration: migrated (0.1200s)