Thursday, November 8, 2007

attachement_fu - size column

While using attachement_fu migration , I ran into the issue of 'size' being a reserved word in Oracle and kept getting the following error while running the migration:
OCIError: ORA-00904: : invalid identifier:


I got around it by naming the database column to 'asize' instead of 'size' in my database migration script and then adding an alias_attribute (>= rails 1.2) to my model as
 alias_attribute :size, :asize


Hope this helps someone.

No comments: