Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAmit Rathi <amit@hypertrack.io>2018-11-21 23:26:11 +0300
committerAmit Rathi <amit@hypertrack.io>2018-11-21 23:26:11 +0300
commit96c325ebfce71ff9435cedd9e217dc820eca1a35 (patch)
tree1d3d7d142676d383b60b739d6a3e481752d0d84e /db
parentceb867a42be76eb7d8a177ab43711e6ef8ad41cf (diff)
unique: true on cluster_id index on cert_manager
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20181101191341_create_clusters_applications_cert_manager.rb3
-rw-r--r--db/schema.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb b/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb
index 5051634327f..40767a18592 100644
--- a/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb
+++ b/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb
@@ -7,12 +7,13 @@ class CreateClustersApplicationsCertManager < ActiveRecord::Migration
def change
create_table :clusters_applications_cert_managers do |t|
- t.references :cluster, null: false, unique: true, index: true, foreign_key: { on_delete: :cascade }
+ t.references :cluster, null: false, unique: true, index: false, foreign_key: { on_delete: :cascade }
t.integer :status, null: false
t.string :version, null: false
t.string :email, null: false
t.timestamps_with_timezone null: false
t.text :status_reason
+ t.index :cluster_id, unique: true
end
end
end
diff --git a/db/schema.rb b/db/schema.rb
index 6b1ab367287..1fdc417b639 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -648,7 +648,7 @@ ActiveRecord::Schema.define(version: 20181112103239) do
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
t.text "status_reason"
- t.index ["cluster_id"], name: "index_clusters_applications_cert_managers_on_cluster_id", using: :btree
+ t.index ["cluster_id"], name: "index_clusters_applications_cert_managers_on_cluster_id", unique: true, using: :btree
end
create_table "clusters_applications_helm", force: :cascade do |t|