Class: CreateAvatars
- Inherits:
-
Object
- Object
- CreateAvatars
- Defined in:
- lib/generators/project/db/migrate/21_create_avatars.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/generators/project/db/migrate/21_create_avatars.rb', line 2 def change create_table :avatars do |t| t.references :imageable, polymorphic: true, index: true t. :uploaded_file t.integer :imageable_id, unsigned: true, index: true, limit: 3 t.string :imageable_type, index: true t. null: false end end |