How can I create or update the database schema from models in rails?
I have to create or update a schema from some models that I have changed in rails. T开发者_开发知识库he original schema file it's wrong because of some changes I have done in the models.
I want to know what can I do (if possible) to create a schema and a migration FROM THE ACTUAL MODELS (based on the "belongs_to", "has_many"... etc tags).
Thanks beforehand!!!
http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many
精彩评论