summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-06-17 14:55:05 +0000
committerSean McGivern <sean@gitlab.com>2019-06-17 14:55:05 +0000
commitcfcdfdd2de6009e7ce55e6a415825a0eca75f0c9 (patch)
tree6c79878d6d451133d6365ead0acf6e8c5eb4c778 /db/migrate
parent52e2a73641577386451b6e9007a15a3dfff25df2 (diff)
parent1f332ae8da994509232c7601074b25514ad23c52 (diff)
downloadgitlab-ce-cfcdfdd2de6009e7ce55e6a415825a0eca75f0c9.tar.gz
Merge branch '58886-issue-tracker-fields' into 'master'
Create models for issue trackers data See merge request gitlab-org/gitlab-ce!28598
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20190430131225_create_issue_tracker_data.rb23
-rw-r--r--db/migrate/20190430142025_create_jira_tracker_data.rb26
2 files changed, 49 insertions, 0 deletions
diff --git a/db/migrate/20190430131225_create_issue_tracker_data.rb b/db/migrate/20190430131225_create_issue_tracker_data.rb
new file mode 100644
index 00000000000..7859bea9c22
--- /dev/null
+++ b/db/migrate/20190430131225_create_issue_tracker_data.rb
@@ -0,0 +1,23 @@
+# 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
+ 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
+ end
+end
diff --git a/db/migrate/20190430142025_create_jira_tracker_data.rb b/db/migrate/20190430142025_create_jira_tracker_data.rb
new file mode 100644
index 00000000000..d328ad63854
--- /dev/null
+++ b/db/migrate/20190430142025_create_jira_tracker_data.rb
@@ -0,0 +1,26 @@
+# 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 CreateJiraTrackerData < ActiveRecord::Migration[5.1]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ create_table :jira_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_url
+ t.string :encrypted_url_iv
+ t.string :encrypted_api_url
+ t.string :encrypted_api_url_iv
+ t.string :encrypted_username
+ t.string :encrypted_username_iv
+ t.string :encrypted_password
+ t.string :encrypted_password_iv
+ t.string :jira_issue_transition_id
+ end
+ end
+end