Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails migration update column default value

class MigrationName < ActiveRecord::Migration
	def change
    	change_column :my_table, :my_column, :data_type, deafult: "value"
	end
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rails #migration #update #column #default
ADD COMMENT
Topic
Name
1+4 =