debian-mirror-gitlab/db/migrate/20221021213216_create_namespace_commit_emails.rb
2023-01-13 15:02:22 +05:30

14 lines
452 B
Ruby

# frozen_string_literal: true
class CreateNamespaceCommitEmails < Gitlab::Database::Migration[2.0]
def change
create_table :namespace_commit_emails do |t|
t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade }
t.references :namespace, null: false
t.references :email, null: false
t.timestamps_with_timezone null: false
t.index [:user_id, :namespace_id], unique: true
end
end
end