Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ae4b8f63
Commit
ae4b8f63
authored
Jul 15, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add jira deployment type to tracker database
and corresponding enum value
parent
160570ab
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
0 deletions
+22
-0
app/models/project_services/jira_tracker_data.rb
app/models/project_services/jira_tracker_data.rb
+2
-0
changelogs/unreleased/229223-store-jira-server-type-in-jira_tracking_data-table.yml
...23-store-jira-server-type-in-jira_tracking_data-table.yml
+5
-0
db/migrate/20200715171155_add_deployment_type_to_tracker.rb
db/migrate/20200715171155_add_deployment_type_to_tracker.rb
+9
-0
db/schema_migrations/20200715171155
db/schema_migrations/20200715171155
+1
-0
db/structure.sql
db/structure.sql
+1
-0
spec/models/project_services/jira_tracker_data_spec.rb
spec/models/project_services/jira_tracker_data_spec.rb
+4
-0
No files found.
app/models/project_services/jira_tracker_data.rb
View file @
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
changelogs/unreleased/229223-store-jira-server-type-in-jira_tracking_data-table.yml
0 → 100644
View file @
ae4b8f63
---
title
:
Add migration for deployment_type of Jira server in jira_tracker_data table
merge_request
:
36992
author
:
type
:
added
db/migrate/20200715171155_add_deployment_type_to_tracker.rb
0 → 100644
View file @
ae4b8f63
# 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
db/schema_migrations/20200715171155
0 → 100644
View file @
ae4b8f63
8db7f9239f6a817f8ad1a4dea388e1a797009cd21e1729817005b0de36c4300f
\ No newline at end of file
db/structure.sql
View file @
ae4b8f63
...
...
@@ -12693,6 +12693,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
))
);
...
...
spec/models/project_services/jira_tracker_data_spec.rb
View file @
ae4b8f63
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment