Sha256: 9918edfaf8471a4ce3eae6d47483030fe60a8a332828ba604f09297832058770

Contents?: true

Size: 727 Bytes

Versions: 37

Compression:

Stored size: 727 Bytes

Contents

class CreateListingMedia < ActiveRecord::Migration
  def change
    create_table :listing_media, options: 'DEFAULT CHARSET=latin1' do |t|
      t.integer :media_order_number
      t.string :media_url, null: false, limit: 512 
      t.string :media_caption
      t.string :media_description
      t.string :media_modification_timestamp
      t.string :type, null: false
      t.references :listing, index: true, null: false, foreign_key: true 

      t.timestamps
    end
    add_index :listing_media, :media_order_number
    add_index :listing_media, :type
    add_index :listing_media, [:media_url, :media_modification_timestamp, :media_order_number, :media_caption, :media_description], name: "on_url_and_timestamp"
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
reso-0.1.4.9 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.8 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.7 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.6 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.5 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.4 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.3 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.2 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.1 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.4.0 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.3.1 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.3.0 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.2.0 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.1.0 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.0.3 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.0.2 lib/generators/reso/templates/create_listing_media.rb
reso-0.1.0.1 lib/generators/reso/templates/create_listing_media.rb