Sha256: 92a051a9e4b0f40c6eef9130af806f9597cd60561dc2308e1158206651a1cc28

Contents?: true

Size: 939 Bytes

Versions: 42

Compression:

Stored size: 939 Bytes

Contents

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

    # Uncomment it to add foreign key. gem 'foreigner' is required in your .Gemfile
    # add_foreign_key(:redactor_assets, :users, dependent: :delete)
    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

42 entries across 24 versions & 6 rubygems

Version Path
redactor-rails-fixes-0.5.0.1 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
rdrails5-0.5.1 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
redactor-rails4-0.5.0 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
redactor-rails-0.5.0 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
redactor-rails-0.4.5 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
redactor-rails-0.4.4 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
redactor-rails-0.4.4 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
th_simple_content_management-0.2.7 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
th_simple_content_management-0.2.7 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
th_simple_content_management-0.2.6 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
th_simple_content_management-0.2.6 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
th_simple_content_management-0.2.5 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
th_simple_content_management-0.2.5 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
th_simple_content_management-0.2.4 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
th_simple_content_management-0.2.4 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
th_simple_content_management-0.2.3 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
th_simple_content_management-0.2.3 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.4.3 lib/generators/redactor/templates/active_record/carrierwave/devise_migration.rb
redactor-rails-0.4.3 lib/generators/redactor/templates/active_record/carrierwave/migration.rb
redactor-rails-0.4.2 lib/generators/redactor/templates/active_record/carrierwave/migration.rb