gitlab-org--gitlab-foss/db/migrate/20140209025651_create_emails.rb
Jason Hollingsworth 29cfd33d94 Add email aliases for users
Emails are used to associate commits with users. The emails
are not verified and don't have to be valid email addresses. They
are assigned on a first come, first serve basis.

Notifications are sent when an email is added.
2014-02-13 22:59:39 -06:00

13 lines
287 B
Ruby

class CreateEmails < ActiveRecord::Migration
def change
create_table :emails do |t|
t.integer :user_id, null: false
t.string :email, null: false
t.timestamps
end
add_index :emails, :user_id
add_index :emails, :email, unique: true
end
end