Commit fb515a18 authored by James Lopez's avatar James Lopez

Merge branch 'generic-alertsettings-model' into 'master'

Create table `alerts_service_data`

See merge request gitlab-org/gitlab-ee!16607
parents cb6042bd 027394bf
---
title: Create table `alerts_service_data`
merge_request: 32860
author:
type: added
# frozen_string_literal: true
class CreateAlertsServiceData < ActiveRecord::Migration[5.2]
DOWNTIME = false
def change
create_table :alerts_service_data do |t|
t.references :service, type: :integer, index: true, null: false,
foreign_key: { on_delete: :cascade }
t.timestamps_with_timezone
t.string :encrypted_token, limit: 255
t.string :encrypted_token_iv, limit: 255
end
end
end
......@@ -26,6 +26,15 @@ ActiveRecord::Schema.define(version: 2019_09_12_061145) do
t.integer "cached_markdown_version"
end
create_table "alerts_service_data", force: :cascade do |t|
t.integer "service_id", null: false
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
t.string "encrypted_token", limit: 255
t.string "encrypted_token_iv", limit: 255
t.index ["service_id"], name: "index_alerts_service_data_on_service_id"
end
create_table "allowed_email_domains", force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
......@@ -3740,6 +3749,7 @@ ActiveRecord::Schema.define(version: 2019_09_12_061145) do
t.index ["type"], name: "index_web_hooks_on_type"
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
add_foreign_key "analytics_cycle_analytics_group_stages", "labels", column: "start_event_label_id", on_delete: :cascade
......
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