LoginSignup
0
0

More than 3 years have passed since last update.

カラム型とRubyクラス

Posted at

*カラム型とRubyクラス

migrationの型 Rubyのクラス MySQL PostgreSQL
integer FixedNum int(11) integer
decimal BigDecimal decimal(10,0) decimal
float Float float float
boolean TrueClass/FalseClass tinyint(1) boolean
string String varchar(255) character varying
text String text text
date Date date date
datetime ActiveSupport::TimeWithZone datetime timestamp
time Time time time
timestamp ActiveSupport::TimeWithZone timestamp timestamp
binary String blob bytea
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0