diff --git a/flyteadmin/pkg/repositories/models/named_entity.go b/flyteadmin/pkg/repositories/models/named_entity.go index 2951f06b77..c6af64aad8 100644 --- a/flyteadmin/pkg/repositories/models/named_entity.go +++ b/flyteadmin/pkg/repositories/models/named_entity.go @@ -6,10 +6,10 @@ import ( // NamedEntityMetadata primary key type NamedEntityMetadataKey struct { - ResourceType core.ResourceType `gorm:"primary_key;named_entity_metadata_type_project_domain_name_idx"` - Project string `gorm:"primary_key;named_entity_metadata_type_project_domain_name_idx"` - Domain string `gorm:"primary_key;named_entity_metadata_type_project_domain_name_idx"` - Name string `gorm:"primary_key;named_entity_metadata_type_project_domain_name_idx"` + ResourceType core.ResourceType `gorm:"primary_key;index:named_entity_metadata_type_project_domain_name_idx"` + Project string `gorm:"primary_key;index:named_entity_metadata_type_project_domain_name_idx"` + Domain string `gorm:"primary_key;index:named_entity_metadata_type_project_domain_name_idx"` + Name string `gorm:"primary_key;index:named_entity_metadata_type_project_domain_name_idx"` } // Fields to be composed into any named entity diff --git a/flyteadmin/pkg/repositories/models/task.go b/flyteadmin/pkg/repositories/models/task.go index 06ff4a5e28..dc5237c3ac 100644 --- a/flyteadmin/pkg/repositories/models/task.go +++ b/flyteadmin/pkg/repositories/models/task.go @@ -5,7 +5,7 @@ package models // Task primary key type TaskKey struct { - Project string `gorm:"primary_key;task_project_domain_name_idx,task_project_domain_idx"` + Project string `gorm:"primary_key;index:task_project_domain_name_idx,task_project_domain_idx"` Domain string `gorm:"primary_key;index:task_project_domain_name_idx,task_project_domain_idx"` Name string `gorm:"primary_key;index:task_project_domain_name_idx"` Version string `gorm:"primary_key"` diff --git a/flyteadmin/pkg/repositories/models/workflow.go b/flyteadmin/pkg/repositories/models/workflow.go index 39e78d8b5e..e7f9d7b286 100644 --- a/flyteadmin/pkg/repositories/models/workflow.go +++ b/flyteadmin/pkg/repositories/models/workflow.go @@ -2,7 +2,7 @@ package models // Workflow primary key type WorkflowKey struct { - Project string `gorm:"primary_key:workflow_project_domain_name_idx,workflow_project_domain_idx"` + Project string `gorm:"primary_key;index:workflow_project_domain_name_idx,workflow_project_domain_idx"` Domain string `gorm:"primary_key;index:workflow_project_domain_name_idx,workflow_project_domain_idx"` Name string `gorm:"primary_key;index:workflow_project_domain_name_idx"` Version string `gorm:"primary_key"`