From c8dc8c388719f8960a1288fa43212c62f1acffc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Thu, 15 Nov 2018 14:34:55 +0100 Subject: [PATCH] Add missing cluster_id on knative --- .../20181030154446_add_missing_indexes_for_foreign_keys.rb | 2 ++ db/schema.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb b/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb index 8a639e3275b..176d55565d8 100644 --- a/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb +++ b/db/migrate/20181030154446_add_missing_indexes_for_foreign_keys.rb @@ -16,6 +16,7 @@ class AddMissingIndexesForForeignKeys < ActiveRecord::Migration add_concurrent_index(:clusters_applications_ingress, :cluster_id, unique: true) add_concurrent_index(:clusters_applications_jupyter, :cluster_id, unique: true) add_concurrent_index(:clusters_applications_jupyter, :oauth_application_id) + add_concurrent_index(:clusters_applications_knative, :cluster_id, unique: true) add_concurrent_index(:clusters_applications_prometheus, :cluster_id, unique: true) add_concurrent_index(:fork_network_members, :forked_from_project_id) add_concurrent_index(:internal_ids, :namespace_id) @@ -45,6 +46,7 @@ class AddMissingIndexesForForeignKeys < ActiveRecord::Migration remove_concurrent_index(:clusters_applications_ingress, :cluster_id, unique: true) remove_concurrent_index(:clusters_applications_jupyter, :cluster_id, unique: true) remove_concurrent_index(:clusters_applications_jupyter, :oauth_application_id) + remove_concurrent_index(:clusters_applications_knative, :cluster_id, unique: true) remove_concurrent_index(:clusters_applications_prometheus, :cluster_id, unique: true) remove_concurrent_index(:fork_network_members, :forked_from_project_id) remove_concurrent_index(:internal_ids, :namespace_id) diff --git a/db/schema.rb b/db/schema.rb index d798a26d498..8e02f43f702 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -687,6 +687,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do t.string "version", null: false t.string "hostname" t.text "status_reason" + t.index ["cluster_id"], name: "index_clusters_applications_knative_on_cluster_id", unique: true, using: :btree end create_table "clusters_applications_prometheus", force: :cascade do |t|