Commit 28bbec91 authored by Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong Committed by Lin Jen-Shin

Add comment_detail column to services

- Use enum for efficiency.
- Allow passing as parameter in controller.
parent d2958460
......@@ -19,6 +19,7 @@ module ServiceParams
:color,
:colorize_messages,
:comment_on_event_enabled,
:comment_detail,
:confidential_issues_events,
:default_irc_uri,
:description,
......
......@@ -25,6 +25,11 @@ class JiraService < IssueTrackerService
before_update :reset_password
enum comment_detail: {
standard: 1,
all_details: 2
}
alias_method :project_url, :url
# When these are false GitLab does not create cross reference
......
---
title: Add comment_detail column to services
merge_request: 29891
author:
type: added
# frozen_string_literal: true
class AddCommentDetailToServices < ActiveRecord::Migration[6.0]
DOWNTIME = false
def up
add_column :services, :comment_detail, :smallint
end
def down
remove_column :services, :comment_detail
end
end
......@@ -5845,7 +5845,8 @@ CREATE TABLE public.services (
description character varying(500),
comment_on_event_enabled boolean DEFAULT true NOT NULL,
template boolean DEFAULT false,
instance boolean DEFAULT false NOT NULL
instance boolean DEFAULT false NOT NULL,
comment_detail smallint
);
CREATE SEQUENCE public.services_id_seq
......@@ -13243,6 +13244,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200408212219
20200409085956
20200409211607
20200410104828
20200410232012
20200413072059
20200413230056
......
......@@ -480,6 +480,7 @@ Service:
- pipeline_events
- job_events
- comment_on_event_enabled
- comment_detail
- category
- default
- wiki_page_events
......
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