# Attachment\_fu attributes in db

**URL:** <https://www.ruby-forum.com/t/attachment-fu-attributes-in-db/131909>\
**Category:** Rails\
**Created:** [March 14, 2008, 9:51am UTC](https://www.ruby-forum.com/t/attachment-fu-attributes-in-db/131909 "2008-03-14T09:51:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [March 14, 2008, 9:51am UTC](https://www.ruby-forum.com/t/attachment-fu-attributes-in-db/131909/1 "2008-03-14T09:51:32Z")

</div>

I’m using file\_column for upload images.  
now,I want to use the plugin attachment\_fu.

I have seen that for use it, i must create the attributes like:

class CreateMugshots \< ActiveRecord::Migration

def self.up  
create\_table :mugshots do |t|  
t.column :parent\_id, :integer  
t.column :content\_type, :string  
t.column :filename, :string  
t.column :thumbnail, :string  
t.column :size, :integer  
t.column :width, :integer  
t.column :height, :integer  
end  
end

is possible create onli the attribute filename?  
Thanks

---

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [March 14, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/attachment-fu-attributes-in-db/131909/2 "2008-03-14T14:15:17Z")

</div>

At the very least you need filename, content\_type, and possibly size.  
If you are not uploading images at all then you can skip height and  
width. If you are not going to create thumbnails then you can skip  
thumbnail and parent\_id.

On Mar 14, 4:51 am, Luca R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [March 14, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/attachment-fu-attributes-in-db/131909/3 "2008-03-14T14:43:40Z")

</div>

mmm…i am uploading images but i cant change the db.  
is possible not user height and width?  
Thanks

AndyV wrote:

> At the very least you need filename, content\_type, and possibly size.  
> If you are not uploading images at all then you can skip height and  
> width. If you are not going to create thumbnails then you can skip  
> thumbnail and parent\_id.
> 
> On Mar 14, 4:51 am, Luca R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
