Tuesday, 15 January 2013

ruby on rails - How do migrations affect the schema.rb file? -



ruby on rails - How do migrations affect the schema.rb file? -

i little confused how migrations impact schema.rb file?

for illustration if write migration rename table column , run migratin , schema:load rake task too, when open schema.rb file should automatically changed have new column name? or should manually alter in there too?

also create_table*.rb files create original tables. automatically have t.timestamp field defined in them creates 2 created_at , updated_at fields in schema, if want remove plenty alter create_table*.rb file , take out t.timestamp them? , run migration? or 1 time again should manually alter shcema.rb file too?

so if can explain little bit how there work great.

the schema file automatically altered when run migrations. should never have manually edit it.

see this rails guide moer information.

ruby-on-rails ruby-on-rails-3.2

No comments:

Post a Comment