Sha256: 5dfdaa8e0ea6ca77874be8f940fc86a1ac29aadcd06b672b3f821a88467610d9

Contents?: true

Size: 726 Bytes

Versions: 5

Compression:

Stored size: 726 Bytes

Contents

class CreateRedactorAssets < ActiveRecord::Migration
  def self.up
    create_table :redactor_assets do |t|
      t.string :custom_file_name
      t.string :data_file_name, :null => false
      t.string :data_content_type
      t.integer :data_file_size

      t.integer :assetable_id
      t.string :assetable_type, :limit => 30
      t.string :type, :limit => 30

      t.integer :width
      t.integer :height

      t.timestamps
    end

    add_index 'redactor_assets', ['assetable_type', 'type', 'assetable_id'], :name => 'idx_redactor_assetable_type'
    add_index 'redactor_assets', ['assetable_type', 'assetable_id'], :name => 'idx_redactor_assetable'
  end

  def self.down
    drop_table :redactor_assets
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
redactor3_rails-0.1.5 lib/generators/redactor3/templates/active_record/carrierwave/migration.rb
redactor3_rails-0.1.4 lib/generators/redactor3/templates/active_record/carrierwave/migration.rb
redactor3_rails-0.1.3 lib/generators/redactor3/templates/active_record/carrierwave/migration.rb
redactor3_rails-0.1.2 lib/generators/redactor3/templates/active_record/carrierwave/migration.rb
redactor3_rails-0.1.1 lib/generators/redactor3/templates/active_record/carrierwave/migration.rb