Migrating a Database in a Rails Project
Use one of the following methods to migrate to a database in a Rails Project.
To migrate using the Rails Console:
-
Open the and run:
rake db:migrate
-
Check the console to see the migration is completed without error.
To migrate using the Model Creation Wizard:
-
Rails Model Wizard
From the workbench select:
-
Add the desired attributes in the dialog.
-
Check the checkbox.
Note:
|
These steps require that the database is set up and the database.yml file is properly configured.
|
Tp run a migration from an Explorer:
-
Right-click on the project folder from the Rails or
Script Explorer.
-
Select
To reverse a migration:
-
Reverse a database migration using the and the following command:
rake migrate VERSION {ver. #}
Related Tasks
Creating a Database
Creating a Model
CodeGear brand
and product names are service marks, trademarks or registered trademarks of Borland Software
Corporation in the United States and other countries.