Commit ac5ed9ff authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '229223-store-jira-server-type-in-jira_tracking_data-table' into 'master'

Add migration for deployment_type of Jira server in `jira_tracker_data` table"

See merge request gitlab-org/gitlab!36992
parents a6c3d03f ae4b8f63
......@@ -7,4 +7,6 @@ class JiraTrackerData < ApplicationRecord
attr_encrypted :api_url, encryption_options
attr_encrypted :username, encryption_options
attr_encrypted :password, encryption_options
enum deployment_type: { unknown: 0, server: 1, cloud: 2 }, _prefix: :deployment
end
---
title: Add migration for deployment_type of Jira server in jira_tracker_data table
merge_request: 36992
author:
type: added
# frozen_string_literal: true
class AddDeploymentTypeToTracker < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
add_column :jira_tracker_data, :deployment_type, :smallint, default: 0, null: false
end
end
8db7f9239f6a817f8ad1a4dea388e1a797009cd21e1729817005b0de36c4300f
\ No newline at end of file
......@@ -12700,6 +12700,7 @@ CREATE TABLE public.jira_tracker_data (
jira_issue_transition_id character varying,
project_key text,
issues_enabled boolean DEFAULT false NOT NULL,
deployment_type smallint DEFAULT 0 NOT NULL,
CONSTRAINT check_214cf6a48b CHECK ((char_length(project_key) <= 255))
);
......
......@@ -8,4 +8,8 @@ RSpec.describe JiraTrackerData do
describe 'Associations' do
it { is_expected.to belong_to(:service) }
end
describe 'deployment_type' do
it { is_expected.to define_enum_for(:deployment_type).with_values([:unknown, :server, :cloud]).with_prefix(:deployment) }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment