unique: true on cluster_id index on cert_manager

This commit is contained in:
Amit Rathi 2018-11-22 01:56:11 +05:30
parent ceb867a42b
commit 96c325ebfc
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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|