Sha256: a25a4b1f8a3c30e830cf61fe352413f032d7734f15f5a752d3111629d69d34d4

Contents?: true

Size: 1.07 KB

Versions: 24

Compression:

Stored size: 1.07 KB

Contents

class CreateCkeditorAssets < ActiveRecord::Migration
  def self.up
    create_table :ckeditor_assets do |t|
      t.integer  "parent_id"
		  t.string   "content_type"
		  t.string   "filename", :limit=>80
		  t.string   "thumbnail", :limit=>20
		  t.integer  "size"
		  t.integer  "width"
		  t.integer  "height"
		  t.string   "type", :limit=>40
		  t.integer  "user_id"
		  t.integer  "assetable_id"
		  t.string   "assetable_type", :limit=>40
		  
      t.timestamps
    end
    
    add_index "ckeditor_assets", ["assetable_id", "assetable_type", "type"], :name => "ndx_type_assetable"
		add_index "ckeditor_assets", ["assetable_id", "assetable_type"], :name => "fk_assets"
		add_index "ckeditor_assets", ["parent_id", "type"], :name => "ndx_type_name"
		add_index "ckeditor_assets", ["thumbnail", "parent_id"], :name => "assets_thumbnail_parent_id"
		add_index "ckeditor_assets", ["user_id", "assetable_type", "assetable_id"], :name => "assets_user_type_assetable_id"
		add_index :ckeditor_assets, :user_id, :name => "fk_user"
  end

  def self.down
    drop_table :ckeditor_assets
  end
end

Version data entries

24 entries across 24 versions & 5 rubygems

Version Path
ckeditor-3.5.4 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
ckeditor-3.5.3 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
ckeditor-3.5.2 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
ckeditor-3.5.1 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
dust-ckeditor-3.5.0 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
hifi-ckeditor-3.5.2 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
hifi-ckeditor-3.5.1 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
artemk-ckeditor-3.5.5 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
ckeditor-jess-3.4.3 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
ckeditor-3.5.0 lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
artemk-ckeditor-3.5.4 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
artemk-ckeditor-3.4.4 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
artemk-ckeditor-3.4.3 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.3.pre lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.3 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.2.pre lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.2 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.1.pre lib/generators/ckeditor/migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.1 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb
ckeditor-3.4.0 generators/ckeditor_migration/templates/models/attachment_fu/migration.rb