How do I get change migration files of existing tabels in rails -


how can generate change file existing table?

can command line or possible hand?

i read text, me it's unclear how change file created?

and if generate change file hand should name this?

don't change migration files, you'll best creating new ones:

$ rails generate migration change_table 

this create new migration, should this:

#db/migrate/[timestamp]_change_table.rb class createtable < activerecord::migration   def change     add_column :table, :column_name, :type, after: :column   end end 

you'll best reading on rails migrations documentation


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -