Fix unique constraint on compose charts table
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ chart: {
|
||||
"primary": { attribute: "id" }
|
||||
"namespace": { attribute: "namespace_id" },
|
||||
"unique_handle": {
|
||||
fields: [{ attribute: "handle", modifiers: ["LOWERCASE"] }]
|
||||
fields: [{ attribute: "handle", modifiers: ["LOWERCASE"] }, { attribute: "namespace_id" }]
|
||||
predicate: "handle != '' AND deleted_at IS NULL"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+4
@@ -216,6 +216,10 @@ var Chart = &dal.Model{
|
||||
AttributeIdent: "Handle",
|
||||
Modifiers: []dal.IndexFieldModifier{"LOWERCASE"},
|
||||
},
|
||||
|
||||
{
|
||||
AttributeIdent: "NamespaceID",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user