Sha256: 991e3d63b360079a7eb1fa9b0c2dbeb4e9e1e6d034b3f22e18f98ccd88508ad2

Contents?: true

Size: 762 Bytes

Versions: 10

Compression:

Stored size: 762 Bytes

Contents

class CreateRedactorAssets < ActiveRecord::Migration
  def self.up
    create_table :redactor_assets do |t|
      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

      # Uncomment	it to save images dimensions, if your need it
      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

10 entries across 10 versions & 1 rubygems

Version Path
redactor-rails-0.3.2 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.3.1 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.3 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.2.5 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.2.4 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.2.3 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.2.1 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.2.0 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.1.1 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.1.0 lib/generators/redactor/templates/active_record/carrierwave/migration.rb