summaryrefslogtreecommitdiff
path: root/db/migrate/20190430131225_create_issue_tracker_data.rb
blob: d2134ad82c7ae3f15be15c439b61dc5337c42bf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class CreateIssueTrackerData < ActiveRecord::Migration[5.1]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def change
    # rubocop:disable Migration/AddLimitToStringColumns
    create_table :issue_tracker_data do |t|
      t.references :service, foreign_key: { on_delete: :cascade }, type: :integer, index: true, null: false
      t.timestamps_with_timezone
      t.string :encrypted_project_url
      t.string :encrypted_project_url_iv
      t.string :encrypted_issues_url
      t.string :encrypted_issues_url_iv
      t.string :encrypted_new_issue_url
      t.string :encrypted_new_issue_url_iv
    end
    # rubocop:enable Migration/AddLimitToStringColumns
  end
end