Sha256: 744fd304335e75939aba5e5dc036f00849689a83748697e5a45a59b001c09b5e

Contents?: true

Size: 773 Bytes

Versions: 31

Compression:

Stored size: 773 Bytes

Contents

class CreateCkeditorAssets < ActiveRecord::Migration
  def self.up
    create_table :ckeditor_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 "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
		add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
  end

  def self.down
    drop_table :ckeditor_assets
  end
end

Version data entries

31 entries across 22 versions & 3 rubygems

Version Path
ckeditor-3.6.3 lib/generators/ckeditor/templates/models/active_record/paperclip/migration.rb
qwerty-0.0.1.pre db/migrate/20110919190859_create_ckeditor_assets.rb
ckeditor-3.6.2 lib/generators/ckeditor/templates/models/active_record/paperclip/migration.rb
ckeditor-3.6.2 lib/generators/ckeditor/templates/models/active_record/carrierwave/migration.rb
ckeditor-3.6.1 lib/generators/ckeditor/templates/models/active_record/paperclip/migration.rb
ckeditor-3.6.1 lib/generators/ckeditor/templates/models/active_record/carrierwave/migration.rb
ckeditor-3.6.0 lib/generators/ckeditor/templates/models/active_record/migration.rb
ckeditor-3.6.0 test/dummy/db/migrate/20110705195648_create_ckeditor_assets.rb
ckeditor-3.6.0.pre test/tmp/db/migrate/20110711170413_create_ckeditor_assets.rb
ckeditor-3.6.0.pre lib/generators/ckeditor/templates/models/active_record/migration.rb
ckeditor-3.6.0.pre test/dummy/db/migrate/20110705195648_create_ckeditor_assets.rb