diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-06-26 11:49:14 +0400 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-07-18 00:47:16 +0400 |
commit | 714f7201d3362793d11f33793e5ef6dc83bdd2f0 (patch) | |
tree | 54e6a4cc5ef89e132a123231b439b83de0e54d54 /db/migrate | |
parent | b634d2801e6abdd039447f53ec5d9cf709f66b06 (diff) |
Add project stars.
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20140625115202_create_users_star_projects.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20140625115202_create_users_star_projects.rb b/db/migrate/20140625115202_create_users_star_projects.rb new file mode 100644 index 00000000000..70475535d54 --- /dev/null +++ b/db/migrate/20140625115202_create_users_star_projects.rb @@ -0,0 +1,13 @@ +class CreateUsersStarProjects < ActiveRecord::Migration + def change + create_table :users_star_projects do |t| + t.integer :project_id, null: false + t.integer :user_id, null: false + t.timestamps + end + + add_index :users_star_projects, :user_id + add_index :users_star_projects, :project_id + add_index :users_star_projects, [:user_id, :project_id], unique: true + end +end |