Skip to content

Suppression d'une convention collective

Maxime Golfier edited this page Jul 17, 2023 · 14 revisions

Etape 1 : Suppression au niveau de kali-data

  1. Supprimer dans data/index.json, la partie liée à la convention collective
  2. Ajouter s'il le faut les synonymes sur les bonnes cc
  3. Relancer le fetch via la github action
  4. Lancer l'ingester via le cron-job de manière manuelle

Etape 2 : Suppression des contributions

Ensuite, il faut se connecter à hasura en effectuant un pont SSH pour pouvoir supprimer les conventions-collectives

query GetContribution {
  contrib_agreements(where: {
    idcc: {_eq: "1740"}
  }) {
    __typename
    id
    idcc
    answers {
      id
    }
    locations_agreements {
      id
    }
    
  }
}
query GetAnswers {
  contrib_answers(where: {
    agreement: {
      idcc: {_eq: "1740"}
    }
  }) {
    __typename
    id
    answers_references {
      id
    }
    answers_comments {
      id
    }
  }
}
query GetReferences {
  contrib_answers_references(where: {
    answer: {
      agreement: {
      	idcc: {_eq: "1740"}
    	}
    }
    
  }) {
    __typename
    id
  }
}
query GetComments {
  contrib_answers_comments(where: {
    answer: {
      agreement: {
      	idcc: {_eq: "1740"}
    	}
    }
    
  }) {
    __typename
    id
  }
}
query getLocationsAgreements {
  contrib_locations_agreements(where: {
    agreement: {
      idcc: {_eq: "1740"}
    }
  }) {
    __typename
    id
  }
}
mutation DeleteLocationsAgreements {
  delete_contrib_locations_agreements(where: {
    agreement: {
      idcc: {_eq: "1740"}
    }
  }) {
    __typename
  }
}
mutation DeleteReferences {
  delete_contrib_answers_references(where: {
    answer: {
      agreement: {
      	idcc: {_eq: "1740"}
    	}
    }
    
  }) {
    __typename
  }
}
mutation DeleteComments {
  delete_contrib_answers_comments(where: {
    answer: {
      agreement: {
      	idcc: {_eq: "1740"}
    	}
    }
    
  }) {
    __typename
  }
}
mutation DeleteAnswers {
  delete_contrib_answers(where: {
    agreement: {
      idcc: {_eq: "1740"}
    }
  }) {
    __typename
  }
}
mutation DeleteContribution {
  delete_contrib_agreements(where: {
    idcc: {_eq: "1740"}
  }) {
    __typename
  }
}