Sha256: 6981505acb2808c6ab56df16f3d0868a9dc3472ed7e7dc1f839929cedbb950f5

Contents?: true

Size: 613 Bytes

Versions: 60

Compression:

Stored size: 613 Bytes

Contents

class AddAppstatsEntriesWeekAndQuarter < ActiveRecord::Migration
  def self.up
    add_column :appstats_entries, :week, :integer
    add_column :appstats_entries, :quarter, :integer
    add_index :appstats_entries, [:year,:week], :name => "index_entries_by_week"
    add_index :appstats_entries, [:year,:quarter], :name => "index_entries_by_quarter"
  end

  def self.down
    remove_column :appstats_entries, :week
    remove_column :appstats_entries, :quarter
    remove_index :appstats_entries, :name => "index_entries_by_week"
    remove_index :appstats_entries, :name => "index_entries_by_quarter"
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
appstats-0.20.11 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.10 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.9 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.8 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.7 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.6 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.2 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.1 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.20.0 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.19.7 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.19.6 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.19.2 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.19.1 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.19.0 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.18.0 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.17.5 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.17.4 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.17.3 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.17.2 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb
appstats-0.17.1 db/migrations/20110223212232_add_appstats_entries_week_and_quarter.rb