Commit 96c325eb authored by Amit Rathi's avatar Amit Rathi

unique: true on cluster_id index on cert_manager

parent ceb867a4
...@@ -7,12 +7,13 @@ class CreateClustersApplicationsCertManager < ActiveRecord::Migration ...@@ -7,12 +7,13 @@ class CreateClustersApplicationsCertManager < ActiveRecord::Migration
def change def change
create_table :clusters_applications_cert_managers do |t| 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.integer :status, null: false
t.string :version, null: false t.string :version, null: false
t.string :email, null: false t.string :email, null: false
t.timestamps_with_timezone null: false t.timestamps_with_timezone null: false
t.text :status_reason t.text :status_reason
t.index :cluster_id, unique: true
end end
end end
end end
...@@ -648,7 +648,7 @@ ActiveRecord::Schema.define(version: 20181112103239) do ...@@ -648,7 +648,7 @@ ActiveRecord::Schema.define(version: 20181112103239) do
t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false t.datetime_with_timezone "updated_at", null: false
t.text "status_reason" 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 end
create_table "clusters_applications_helm", force: :cascade do |t| create_table "clusters_applications_helm", force: :cascade do |t|
......
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