debian-mirror-gitlab/db/migrate/20221021213216_create_namespace_commit_emails.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
452 B
Ruby
Raw Normal View History

2023-01-13 00:05:48 +05:30
# 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