20130516183705_create_ckeditor_assets.rb 771 B

123456789101112131415161718192021222324252627
  1. class CreateCkeditorAssets < ActiveRecord::Migration
  2. def self.up
  3. create_table :ckeditor_assets do |t|
  4. t.string :data_file_name, :null => false
  5. t.string :data_content_type
  6. t.integer :data_file_size
  7. t.integer :assetable_id
  8. t.string :assetable_type, :limit => 30
  9. t.string :type, :limit => 30
  10. # Uncomment it to save images dimensions, if your need it
  11. t.integer :width
  12. t.integer :height
  13. t.timestamps
  14. end
  15. add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], :name => "idx_ckeditor_assetable_type"
  16. add_index "ckeditor_assets", ["assetable_type", "assetable_id"], :name => "idx_ckeditor_assetable"
  17. end
  18. def self.down
  19. drop_table :ckeditor_assets
  20. end
  21. end