Sha256: 914ac21a33b8fca9ca0735deca63580525b0fd0acd50c6987b84f58c85abb5c4

Contents?: true

Size: 620 Bytes

Versions: 33

Compression:

Stored size: 620 Bytes

Contents

class AddIndexesOnDeliveries < ActiveRecord::Migration[5.0]
  def up
    change_column :deliveries, :status, :string, limit: 50
    change_column :deliveries, :event, :string, limit: 50
    add_index :deliveries, [:hook_id, :event, :status]
    add_index :deliveries, [:status, :event]
    add_index :deliveries, :created_at
  end

  def down
    change_column :deliveries, :status, :string, limit: 255
    change_column :deliveries, :event, :string, limit: 255
    remove_index :deliveries, [:hook_id, :event, :status]
    remove_index :deliveries, [:status, :event]
    remove_index :deliveries, :created_at
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
shipit-engine-0.39.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.38.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.37.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.36.1 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.36.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.35.1 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.35.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.34.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.33.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.32.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.31.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.30.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.29.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.28.1 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.28.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.27.1 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.27.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.26.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.25.1 db/migrate/20161205144522_add_indexes_on_deliveries.rb
shipit-engine-0.25.0 db/migrate/20161205144522_add_indexes_on_deliveries.rb