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"
Split the flat
datamart/StoredProcedures/folder into subdirectories grouped by purpose.HealthChecks/already follows this pattern; the rest should too.Proposed structure
Mapping
Reports/ (granted to WalterAppRole):
usp_GetAllPositionBudgets.sqlusp_GetEmployeeAccrualBalances.sqlusp_GetFacultyDeptPortfolio.sqlusp_GetFacultyDeptPortfolioElzar.sqlusp_GetGLPPMReconciliation.sqlusp_GetGLProjectSummaryElzar.sqlusp_GetGLTransactionListings.sqlusp_GetLaborLedgerData.sqlusp_GetPositionBudgets.sqlusp_GetPPMProjectSummaryElzar.sqlusp_GetProjectSummary.sqlPipeline/ (granted to WalterPipelineRole):
usp_SwapPositionBudgets.sqlUtilities/ (granted as needed by either role):
usp_LogProcedureExecution.sqlusp_ParseProjectIdFilter.sqlusp_SanitizeInputString.sqlusp_ValidateAggieEnterpriseProject.sqlusp_ValidateFinancialDept.sqlNotes
.sqlfiles via globs; no.sqlprojedits neededdboScript.PostDeployment.sqlinto matching sections (App grants, Pipeline grants, Utility grants) for consistencygit mvonly (no content changes) so git rename detection works and reviewers see "100% renames"