Skip to content

Commit

Permalink
fix(db setup): removed duplicate index creation for foreign keys
Browse files Browse the repository at this point in the history
  • Loading branch information
drochow committed Jun 28, 2024
1 parent dad0d8e commit 7bd2532
Showing 1 changed file with 1 addition and 93 deletions.
94 changes: 1 addition & 93 deletions internal/database/mariadb/init/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -366,96 +366,4 @@ create table if not exists IssueRepositoryService
constraint fk_service_issue_repository
foreign key (issuerepositoryservice_service_id) references Service (service_id)
on update cascade
);



create index if not exists fk_issuevariant_issuerepository
on IssueVariant (issuevariant_repository_id);

create index if not exists fk_issue_variant_issue
on IssueVariant (issuevariant_issue_id);

create index if not exists fk_component_version_component
on ComponentVersion (componentversion_component_id);

create index if not exists fk_component_instance_component_version
on ComponentInstance (componentinstance_component_version_id);

create index if not exists fk_component_instance_service
on ComponentInstance (componentinstance_service_id);

create index if not exists fk_evidence_activity
on Evidence (evidence_activity_id);

create index if not exists fk_evidence_user
on Evidence (evidence_author_id);

create index if not exists fk_service_user
on Owner (owner_service_id);

create index if not exists fk_user_service
on Owner (owner_user_id);

create index if not exists fk_issue_match_user
on IssueMatch (issuematch_user_id);

create index if not exists fk_issue_match_component_instance
on IssueMatch (issue_component_instance_id);

create index if not exists fk_issue_match_issue
on IssueMatch (issuematch_issue_id);

create index if not exists fk_support_group_user
on SupportGroupUser (supportgroupuser_support_group_id);

create index if not exists fk_user_support_group
on SupportGroupUser (supportgroupuser_user_id);

create index if not exists fk_support_group_service
on SupportGroupService (supportgroupservice_support_group_id);

create index if not exists fk_service_support_group
on SupportGroupService (supportgroupservice_service_id);

create index if not exists fk_activity_issue
on ActivityHasIssue (activityhasissue_issue_id);

create index if not exists fk_issue_activity
on ActivityHasIssue (activityhasissue_activity_id);

create index if not exists fk_activity_service
on ActivityHasService (activityhasservice_service_id);

create index if not exists fk_service_activity
on ActivityHasService (activityhasservice_activity_id);

create index if not exists fk_componentversionissue_issue
on ComponentVersionIssue (componentversionissue_issue_id);

create index if not exists fk_componentversionissue_component_version
on ComponentVersionIssue (componentversionissue_component_version_id);

create index if not exists fk_issue_match_evidence
on IssueMatchEvidence (issuematchevidence_evidence_id);

create index if not exists fk_evidence_issue_match
on IssueMatchEvidence (issuematchevidence_issue_match_id);

create index if not exists issuematch_rating_idx
on IssueMatch (issuematch_rating);

create index if not exists issuevariant_rating_idx
on IssueVariant (issuevariant_rating);

create index if not exists fk_issue_repository_service
on IssueRepositoryService (issuerepositoryservice_issue_repository_id);

create index if not exists fk_service_issue_repository
on IssueRepositoryService (issuerepositoryservice_service_id);

create index if not exists fk_issuematchchange_activity
on IssueMatchChange (issuematchchange_activity_id);

create index if not exists fk_issuematchchange_issue_match
on IssueMatchChange (issuematchchange_issue_match_id);
);

0 comments on commit 7bd2532

Please sign in to comment.