2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-31 00:06:56 -04:00
|
|
|
class CreateDirectoryItems < ActiveRecord::Migration[4.2]
|
2015-03-16 15:14:33 -04:00
|
|
|
def change
|
2015-03-26 16:57:50 -04:00
|
|
|
create_table :directory_items, force: true do |t|
|
2015-03-16 15:14:33 -04:00
|
|
|
t.integer :period_type, null: false
|
|
|
|
t.references :user, null: false
|
|
|
|
t.integer :likes_received, null: false
|
|
|
|
t.integer :likes_given, null: false
|
|
|
|
t.integer :topics_entered, null: false
|
|
|
|
t.integer :topic_count, null: false
|
|
|
|
t.integer :post_count, null: false
|
2017-08-07 20:59:18 -04:00
|
|
|
t.timestamps null: true
|
2015-03-16 15:14:33 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
add_index :directory_items, :period_type
|
|
|
|
end
|
|
|
|
end
|