From 1f332ae8da994509232c7601074b25514ad23c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarka=20Ko=C5=A1anov=C3=A1?= Date: Wed, 22 May 2019 16:47:42 +0100 Subject: Create models for issue trackers data - create tables for storing issue trackers properties - add model and basic logic & spec --- .../20190430131225_create_issue_tracker_data.rb | 23 +++++++++++++++++++ .../20190430142025_create_jira_tracker_data.rb | 26 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 db/migrate/20190430131225_create_issue_tracker_data.rb create mode 100644 db/migrate/20190430142025_create_jira_tracker_data.rb (limited to 'db/migrate') 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 -- cgit v1.2.1