HydrologicEngineeringCenter / HydrologicEngineeringCenter/cwms-database

Loc group delete has left over code that needs to be deleted

Open
#87 0 comments 0 reactions 1 assignee View on GitHub

@katfeingold is already working on this.

Since Jan 6, 2026.

Dominant language
Visual Basic 6.0
Stars
4
Forks
8
Avg merge
8d 20h
Merged PRs (30d)
4

Description

The cwms loc group delete when doing cascade has old dead code that needs to be pruned. Rating source agencies are representing using entities now. The block of code that updates the at_rating_spec table needs to be removed and tests added to verify behavior.

https://github.com/HydrologicEngineeringCenter/cwms-database/blob/main/schema/src/cwms/cwms_loc_pkg_body.sql#L4891

   PROCEDURE delete_loc_group (p_loc_group_code   IN NUMBER,
                               p_cascade           IN VARCHAR2 DEFAULT 'F'
                              )
   IS
   BEGIN
      IF cwms_util.is_true (p_cascade)
      THEN
         DELETE FROM   at_loc_group_assignment
               WHERE   loc_group_code = p_loc_group_code;

         UPDATE   at_rating_spec
            SET   source_agency_code = NULL
          WHERE   source_agency_code = p_loc_group_code;
      END IF;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.