Class: CreateAttachableAssets
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateAttachableAssets
- Defined in:
- lib/generators/cable/media/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/cable/media/templates/migration.rb', line 16 def self.down drop_table :attachable_assets end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/cable/media/templates/migration.rb', line 2 def self.up create_table :attachable_assets do |t| t.string :type t.integer :attachable_id t.string :attachable_type t.string :attachment_file_name t.string :attachment_content_type t.integer :attachment_file_size t.datetime :attachment_updated_at t.integer :position t. end end |