Sha256: b0310773dc45ffafe5dfcf83cc9d48501a7d38fee22815aee07927c9c34853c2

Contents?: true

Size: 334 Bytes

Versions: 23

Compression:

Stored size: 334 Bytes

Contents

class AddIndexesToApiToken < ActiveRecord::Migration
  def up
    add_index :api_tokens, :token
    add_index :api_tokens, [ :tokenable_id, :tokenable_type ], length: { tokenable_id: 16 }
  end

  def down
    remove_index :api_tokens, column: :token
    remove_index :api_tokens, column: [ :tokenable_id, :tokenable_type ]
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
iugusdk-1.0.11 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.10 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.9 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.8 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.7 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.6 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.5 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.4 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.3 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.2 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.1 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.32 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.31 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.30 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.29 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.28 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.27 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.26 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.25 db/migrate/20130716203032_add_indexes_to_api_token.rb
iugusdk-1.0.0.alpha.24 db/migrate/20130716203032_add_indexes_to_api_token.rb