diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-21 21:06:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-21 21:06:14 +0000 |
commit | 170f0bdcdef9c9b226abfe0a50d6687c65e8d613 (patch) | |
tree | 5c82769a5380a0fd495bd1adb098c8c360334587 /db | |
parent | f1bb2a307e9b125a8ee0be3728cb0d1baa21a3d4 (diff) | |
download | gitlab-ce-170f0bdcdef9c9b226abfe0a50d6687c65e8d613.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190930153535_create_zoom_meetings.rb | 24 | ||||
-rw-r--r-- | db/schema.rb | 14 |
2 files changed, 38 insertions, 0 deletions
diff --git a/db/migrate/20190930153535_create_zoom_meetings.rb b/db/migrate/20190930153535_create_zoom_meetings.rb new file mode 100644 index 00000000000..6b92c53da79 --- /dev/null +++ b/db/migrate/20190930153535_create_zoom_meetings.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +class CreateZoomMeetings < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + ZOOM_MEETING_STATUS_ADDED = 1 + + def change + create_table :zoom_meetings do |t| + t.references :project, foreign_key: { on_delete: :cascade }, + null: false + t.references :issue, foreign_key: { on_delete: :cascade }, + null: false + t.timestamps_with_timezone null: false + t.integer :issue_status, limit: 2, default: 1, null: false + t.string :url, limit: 255 + + t.index [:issue_id, :issue_status], unique: true, + where: "issue_status = #{ZOOM_MEETING_STATUS_ADDED}" + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 37e540a9b3a..109f9e8e038 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -3992,6 +3992,18 @@ ActiveRecord::Schema.define(version: 2019_10_16_220135) do t.index ["type"], name: "index_web_hooks_on_type" end + create_table "zoom_meetings", force: :cascade do |t| + t.bigint "project_id", null: false + t.bigint "issue_id", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false + t.integer "issue_status", limit: 2, default: 1, null: false + t.string "url", limit: 255 + t.index ["issue_id", "issue_status"], name: "index_zoom_meetings_on_issue_id_and_issue_status", unique: true, where: "(issue_status = 1)" + t.index ["issue_id"], name: "index_zoom_meetings_on_issue_id" + t.index ["project_id"], name: "index_zoom_meetings_on_project_id" + end + add_foreign_key "alerts_service_data", "services", on_delete: :cascade add_foreign_key "allowed_email_domains", "namespaces", column: "group_id", on_delete: :cascade add_foreign_key "analytics_cycle_analytics_group_stages", "labels", column: "end_event_label_id", on_delete: :cascade @@ -4406,4 +4418,6 @@ ActiveRecord::Schema.define(version: 2019_10_16_220135) do add_foreign_key "vulnerability_scanners", "projects", on_delete: :cascade add_foreign_key "web_hook_logs", "web_hooks", on_delete: :cascade add_foreign_key "web_hooks", "projects", name: "fk_0c8ca6d9d1", on_delete: :cascade + add_foreign_key "zoom_meetings", "issues", on_delete: :cascade + add_foreign_key "zoom_meetings", "projects", on_delete: :cascade end |