db Table Column 지원 목록







기본적으로 SQL의 목록을 따른다.



:String

짧은 문자열. 제목이나 태그로 사용.



:Text:

긴 문자열. html의 text_area에 적합.



:Integer

숫자



:Decimal

정밀한 소수. 부동소수점을 정확하게 제공해준다.



:Boolean

true, false만 저장함.



:Binray

사진이나 영상을 원본 그대로 보존할때 사용.



:Date, :Time, :DateTime

날짜와 시간을 저장할때 사용.








Rails 4버전과 PostgreSQL을 사용한다면 이것도 가능


  • :hstore
  • :array
  • :cidr_address
  • :ip_address
  • :mac_address




참조 :

https://stackoverflow.com/questions/11889048/is-there-documentation-for-the-rails-column-types

https://stackoverflow.com/questions/3260345/list-of-rails-model-types





+ Recent posts