I am trying to create a binary field model in Datamapper for Rails 3 that looks like this:
class Image
include DataMapper::Resource
property :id, Serial
property :url, String
property :file_name, String
property :content_type, String
property :data, Binary
property :created_at, DateTime
property :updated_at, DateTime
end
However, when I try to migrate, I get the following:
ERROR: type modifier is not allowed for type "bytea"
LINE 1: ..." VARCHAR(50), "content_type" VARCHAR(50), "data" BYTEA(50),...
I cannot find a way to remove the 50 limit that datamapper places on the field. Does anyone know how to do this or solve a problem?
source
share