Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails migration column types

class CreateProducts < ActiveRecord::Migration
  def change
    create_table :products do |t|
      t.string :name
      t.text :description
 
      t.timestamps
    end
  end
end
Source by guides.rubyonrails.org #
 
PREVIOUS NEXT
Tagged: #rails #migration #column #types
ADD COMMENT
Topic
Name
6+4 =