summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-10 14:41:21 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-14 12:06:42 +0200
commit1e97864958b5ee7cb92a6d45ceab6b6e476c5e7e (patch)
treef1e1cbf86eabc5ba42f173741ef2ab8b3d029d09 /db
parente6569defe61f114beb051a1ebf8186f03eed1f5c (diff)
downloadgitlab-ce-1e97864958b5ee7cb92a6d45ceab6b6e476c5e7e.tar.gz
Add invite data to member.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150406133311_add_invite_data_to_member.rb12
-rw-r--r--db/schema.rb7
2 files changed, 18 insertions, 1 deletions
diff --git a/db/migrate/20150406133311_add_invite_data_to_member.rb b/db/migrate/20150406133311_add_invite_data_to_member.rb
new file mode 100644
index 00000000000..3452fd45c4f
--- /dev/null
+++ b/db/migrate/20150406133311_add_invite_data_to_member.rb
@@ -0,0 +1,12 @@
+class AddInviteDataToMember < ActiveRecord::Migration
+ def change
+ add_column :members, :created_by_id, :integer
+ add_column :members, :invite_email, :string
+ add_column :members, :invite_token, :string
+ add_column :members, :invite_accepted_at, :datetime
+
+ change_column :members, :user_id, :integer, null: true
+
+ add_index :members, :invite_token, unique: true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 48f1b2ac2cc..11371f168b9 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -163,15 +163,20 @@ ActiveRecord::Schema.define(version: 20150411180045) do
t.integer "access_level", null: false
t.integer "source_id", null: false
t.string "source_type", null: false
- t.integer "user_id", null: false
+ t.integer "user_id"
t.integer "notification_level", null: false
t.string "type"
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "created_by_id"
+ t.string "invite_email"
+ t.string "invite_token"
+ t.datetime "invite_accepted_at"
end
add_index "members", ["access_level"], name: "index_members_on_access_level", using: :btree
add_index "members", ["created_at", "id"], name: "index_members_on_created_at_and_id", using: :btree
+ add_index "members", ["invite_token"], name: "index_members_on_invite_token", unique: true, using: :btree
add_index "members", ["source_id", "source_type"], name: "index_members_on_source_id_and_source_type", using: :btree
add_index "members", ["type"], name: "index_members_on_type", using: :btree
add_index "members", ["user_id"], name: "index_members_on_user_id", using: :btree