Prev | Current Page 121 | Next

David Berube

"Practical Reporting with Ruby and Rails"

0000s
-- create_table(:projects)
-> 0.0160s
-- create_table(:rooms)
-> 0.0000s
-- create_table(:bookings)
-> 0.0000s
== InitialSchema: migrated (0.0160s) ==========================================
Note that this process also works in reverse. You can specify a version to migrate your
database to using the VERSION=x option, and specifying 0 will revert your database. For
example, the following command will undo the previous migration command:
rake db:migrate VERSION=0
(in /your_path/your_directory/actor_schedule)
== InitialSchema: reverting ===================================================
-- drop_table(:actors)
-> 0.0000s
-- drop_table(:projects)
-> 0.0000s
-- drop_table(:rooms)
-> 0.0000s
-- drop_table(:bookings)
CHAPTER 5 n CONNECTING YOUR REPORTS TO THE WORLD 80
-> 0.0160s
== InitialSchema: reverted (0.0630s) ==========================================
nNote The rake command has a whole host of other uses. It??™s similar to the make command, but it??™s written
in pure Ruby and is used to perform various maintenance tasks for Rails applications.


Pages:
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133