Rails Migrations: List of Table Column Types

This list was compiled from rails 4, but may also be valid in earlier versions of rails. Use Active Record migrations to alter your database in a structured and organized manner.

List of attributes for SQL types:

list_column_types.rb
1
2
3
4
5
6
7
8
9
10
11
  :binary
  :boolean
  :date
  :datetime
  :decimal
  :float
  :integer
  :primary_key
  :string
  :text
  :time

You may also use database specific types, however this is not database agnostic and is to be used with caution.