Ruby On Rails Interviewfragen und Antworten
Question: How can you migrate your database schema one level down?Answer:The rake tool does most of the migrations. It has this nifty syntax to go back one step: rake db:rollback If you want to rollback all the way to the beginning you would use: rake db:reset This would drop the database, recreate the Database and load the current schema into it If you want to rollback multiple steps at the same time you would use: rake db:rollback STEP=3 To rollback all the way and if you are not worried about losing the data then you can drop the database completely with purge like this: rake db:purge |
Zum Wiederholen speichern
Speichere diesen Eintrag als Lesezeichen, markiere ihn als schwierig oder lege ihn in einem Wiederholungsset ab.
Melde dich an, um Lesezeichen, schwierige Fragen und Wiederholungssets zu speichern.
Am hilfreichsten laut Nutzern:
- What is Ruby On Rails?
- Why Ruby on Rails?
- Explain how (almost) everything is an object in Ruby.
- What are Gems and which are some of your favorites?
- How would you declare and use a constructor in Ruby?