Commit 027394bf authored by Peter Leitzen's avatar Peter Leitzen Committed by James Lopez

Create table `alerts_service_data`

This table contains data for the `AlertsService` avoiding the usage of
properties.
parent cb6042bd
---
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