/ Published in: Other
Data Types for DB, MySQL, SQLite, PHP, Ruby, Rails, JS, etc. because I forget them sometimes
from Ruby on Rails Guides: Migrations http://bit.ly/hFWjT0
from Rails Migrations http://bit.ly/hI5zpz
from Ruby on Rails Guides: Migrations http://bit.ly/hFWjT0
from Rails Migrations http://bit.ly/hI5zpz
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Data Types for DB, MySQL, SQLite, PHP, Ruby, Rails, JS, etc. ==== from Ruby on Rails Guides: Migrations http://bit.ly/hFWjT0 The types supported by Active Record are :primary_key, :string, :text, :integer, :float, :decimal, :datetime, :timestamp, :time, :date, :binary, :boolean. ==== from Rails Migrations http://bit.ly/hI5zpz Migrations support all the basic data types: string, text, integer, float, datetime, timestamp, time, date, binary and boolean: string - is for small data types such as a title. text - is for longer pieces of textual data, such as the description. integer - is for whole numbers. float - is for decimals. datetime timestamp - store the date and time into a column. date time - store either the date only or time only. binary - is for storing data such as images, audio, or movies. boolean - is for storing true or false values.