Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions snd/history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# snd module history

**TL;DR:** the `snd` module's full commit history travels with it on every migration. **File-level** history and blame work everywhere — GitHub, IntelliJ, and any tool that follows renames (Sourcetree, GitKraken, Fork, GitLens, `git log --follow`, etc.). **Directory-level** history (`git log -- snd/` or GitHub's directory tree view) only shows commits since the most recent migration — for older directory-level browsing, open the corresponding repo from the table below.

## Why directory-level history is limited

Each migration changed the path of the module — first from a repo root into a subdirectory, then between subdirectories. Git's rename detection is per-file, not per-directory, so a directory-level log starts fresh at each move even though every individual file's history remains intact.

## Where prior history lives

| Repository | History active | Notes |
|------------------------------------------------------------------------------------------------------------------|-------------------------|--------------------------------------------------------------------------|
| [LabKey/snd](https://github.com/LabKey/snd) | until 2025-02-24 | Original standalone repo. Now archived. |
| [LabKey/ehrModules/snd](https://github.com/LabKey/ehrModules/tree/fc811d93c1a99ee46e219508da17041a9bcfb2d4/snd) | 2025-02-24 → 2026-05-05 | Rehomed via `LabKey/ehrModules` commit `76b86bc5` ("Rehome snd module"). |
| [LabKey/snprcEHRModules/snd](https://github.com/LabKey/snprcEHRModules/tree/develop/snd) | 2026-05-05 → present | Current home. Rehomed from `LabKey/ehrModules`. |

## Browsing history

### File-level (works everywhere)

Any Git tool that follows renames will show full history back to the module's origin:

- **GitHub**: open any individual file, then click *History* or *Blame*. GitHub follows renames automatically across migrations.
- **IntelliJ**: right-click a file → *Git → Show History* (or *Annotate* for blame).
- **Other tools** (Sourcetree, GitKraken, Fork, GitLens, etc.): use the file's history or blame view — these tools follow renames by default.
- **CLI**: `git log --follow -- <path/to/file>`.

### Directory-level (use the table above)

There is no built-in equivalent to `--follow` for directories. To see directory-level history from before a migration, open the corresponding repo from the table above for the date range you care about and browse the module directory there.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ALTER VIEW [labkey_etl].[v_charge_account] AS
-- 11/11/2016 added modified, modifiedby, created, and createdby columns tjh
-- 10/22/2019 removed distinct clause from valid_charge_by_species join tjh
-- 02/15/2020 Added fallback for missing created & createdBy columns tjh
-- 04/23/2026 Removed join on species table and added OUTER APPLY ja
-- ==========================================================================================


Expand All @@ -47,7 +48,12 @@ ALTER VIEW [labkey_etl].[v_charge_account] AS
ca.timestamp AS timestamp
FROM dbo.charge_account AS ca
LEFT OUTER JOIN dbo.TAC_COLUMNS AS tc ON tc.object_id = ca.object_id
LEFT OUTER JOIN dbo.valid_charge_by_species AS vcs ON ca.charge_id = vcs.charge_id
OUTER APPLY (
SELECT TOP 1 vcs2.charge_id, vcs2.arc_species_code
FROM dbo.valid_charge_by_species vcs2
WHERE vcs2.charge_id = ca.charge_id
ORDER BY vcs2.arc_species_code
) vcs
LEFT OUTER JOIN dbo.prd_cost_account AS pca on pca.account_id = ca.account_id


Expand Down
Loading