Files
gitlink-forgeplus/db/migrate/20200106022157_create_project_trends.rb
2020-03-09 00:40:16 +08:00

13 lines
341 B
Ruby

class CreateProjectTrends < ActiveRecord::Migration[5.2]
def change
create_table :project_trends do |t|
t.integer :user_id
t.integer :project_id
t.references :trend, polymorphic: true, index: true
t.string :action_type
t.timestamps
end
add_index :project_trends, [:user_id, :project_id]
end
end