Sha256: 72d278487cd0c5d44376ac5e9bb108c149117375931da79cdd87cc5c42a77308

Contents?: true

Size: 411 Bytes

Versions: 6

Compression:

Stored size: 411 Bytes

Contents

class CreateTallyRecords < ActiveRecord::Migration[5.2]
  def change
    create_table :tally_records do |t|
      t.date :day
      t.bigint :recordable_id
      t.string :recordable_type
      t.string :key
      t.integer :value, default: 0

      t.timestamps
    end

    add_index :tally_records, [ :day, :key, :recordable_id, :recordable_type ], name: "index_tally_records_on_day", unique: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tally-2.1.0 db/migrate/20181016172358_create_tally_records.rb
tally-2.0.0 db/migrate/20181016172358_create_tally_records.rb
tally-1.0.2 db/migrate/20181016172358_create_tally_records.rb
tally-1.0.1 db/migrate/20181016172358_create_tally_records.rb
tally-1.0.0 db/migrate/20181016172358_create_tally_records.rb
tally-1.0.0.beta1 db/migrate/20181016172358_create_tally_records.rb