summaryrefslogtreecommitdiff
path: root/db/migrate/20190918102042_create_grafana_integrations.rb
blob: d48aaaf45bc944dead12d4c50a0deca152f38de6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

class CreateGrafanaIntegrations < ActiveRecord::Migration[5.2]
  DOWNTIME = false

  # rubocop:disable Migration/PreventStrings
  def change
    create_table :grafana_integrations do |t|
      t.references :project, index: true, foreign_key: { on_delete: :cascade }, unique: true, null: false
      t.timestamps_with_timezone null: false
      t.string :encrypted_token, limit: 255, null: false
      t.string :encrypted_token_iv, limit: 255, null: false
      t.string :grafana_url, null: false, limit: 1024
    end
  end
  # rubocop:enable Migration/PreventStrings
end