Sha256: 80079c1e3b3c74120154b728af4d1488e7ef1418777325b4d90234f409aef023

Contents?: true

Size: 487 Bytes

Versions: 20

Compression:

Stored size: 487 Bytes

Contents

class CreateUserStats < ActiveRecord::Migration
  def change
    create_table :user_stats do |t|
      t.integer :user_id
      t.datetime :date
      t.integer :file_views
      t.integer :file_downloads

      t.timestamps null: false
    end

    add_column :file_view_stats, :user_id, :integer
    add_column :file_download_stats, :user_id, :integer

    add_index :user_stats, :user_id
    add_index :file_view_stats, :user_id
    add_index :file_download_stats, :user_id
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
sufia-7.4.1 db/migrate/20160328222231_create_user_stats.rb
sufia-7.4.0 db/migrate/20160328222231_create_user_stats.rb
hyrax-1.0.1 db/migrate/20160328222231_create_user_stats.rb
hyrax-1.0.0.rc2 db/migrate/20160328222231_create_user_stats.rb
sufia-7.3.1 db/migrate/20160328222231_create_user_stats.rb
hyrax-1.0.0.rc1 db/migrate/20160328222231_create_user_stats.rb
sufia-7.3.0 db/migrate/20160328222231_create_user_stats.rb
sufia-7.3.0.rc3 db/migrate/20160328222231_create_user_stats.rb
sufia-7.3.0.rc2 db/migrate/20160328222231_create_user_stats.rb
sufia-7.3.0.rc1 db/migrate/20160328222231_create_user_stats.rb
test_hyrax-0.0.1.alpha db/migrate/20160328222231_create_user_stats.rb
sufia-7.2.0 db/migrate/20160328222231_create_user_stats.rb
sufia-7.1.0 db/migrate/20160328222231_create_user_stats.rb
sufia-7.0.0 db/migrate/20160328222231_create_user_stats.rb
sufia-7.0.0.rc2 db/migrate/20160328222231_create_user_stats.rb
sufia-7.0.0.rc1 db/migrate/20160328222231_create_user_stats.rb
sufia-7.0.0.beta4 db/migrate/20160328222231_create_user_stats.rb
sufia-7.0.0.beta3 lib/generators/sufia/templates/migrations/create_user_stats.rb
sufia-7.0.0.beta2 lib/generators/sufia/templates/migrations/create_user_stats.rb
sufia-7.0.0.beta1 lib/generators/sufia/templates/migrations/create_user_stats.rb