Skip to content

Reorganize StoredProcedures into subdirectories #272

@rmartinsen-ucd

Description

@rmartinsen-ucd

Split the flat datamart/StoredProcedures/ folder into subdirectories grouped by purpose. HealthChecks/ already follows this pattern; the rest should too.

Proposed structure

StoredProcedures/
├── HealthChecks/    (already exists)
├── Reports/         (app-facing, granted to WalterAppRole)
├── Pipeline/        (called by Fabric/SQL Agent pipelines, granted to WalterPipelineRole)
└── Utilities/       (helpers, logging, validators — granted as needed)

Mapping

Reports/ (granted to WalterAppRole):

  • usp_GetAllPositionBudgets.sql
  • usp_GetEmployeeAccrualBalances.sql
  • usp_GetFacultyDeptPortfolio.sql
  • usp_GetFacultyDeptPortfolioElzar.sql
  • usp_GetGLPPMReconciliation.sql
  • usp_GetGLProjectSummaryElzar.sql
  • usp_GetGLTransactionListings.sql
  • usp_GetLaborLedgerData.sql
  • usp_GetPositionBudgets.sql
  • usp_GetPPMProjectSummaryElzar.sql
  • usp_GetProjectSummary.sql

Pipeline/ (granted to WalterPipelineRole):

  • usp_SwapPositionBudgets.sql

Utilities/ (granted as needed by either role):

  • usp_LogProcedureExecution.sql
  • usp_ParseProjectIdFilter.sql
  • usp_SanitizeInputString.sql
  • usp_ValidateAggieEnterpriseProject.sql
  • usp_ValidateFinancialDept.sql

Notes

  • SDK-style SQL projects (Microsoft.Build.Sql) pick up .sql files via globs; no .sqlproj edits needed
  • Subdirectories do not affect the deployed schema — everything still lands in dbo
  • Reorganize Script.PostDeployment.sql into matching sections (App grants, Pipeline grants, Utility grants) for consistency
  • Do the moves in a single PR using git mv only (no content changes) so git rename detection works and reviewers see "100% renames"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions