Skip to content

Commit 42bdb88

Browse files
Merge pull request #62 from Juliusolsson05/chore/include-leadership-in-db-snapshots
chore: include leadership tables in db snapshots
2 parents a7cc9bd + 82a0a0a commit 42bdb88

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

docs/database/SNAPSHOTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ This keeps local onboarding easy while preserving an offline-safe fallback path.
2525

2626
The published artifact is data-only. Schema creation stays in Prisma migrations, which makes the snapshot portable across local environments.
2727

28+
The snapshot now includes leadership tree product data as well, including people, roles, relations, tenures, control states, and leadership event links. That keeps fresh local restores aligned with the live actor dossier and leadership graph experience.
29+
2830
## Commands
2931

3032
```bash

docs/database/SNAPSHOT_POLICY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ Public onboarding snapshots use an explicit allowlist. If a table is not on the
1515
- `IntelEvent`
1616
- `EventSource`
1717
- `EventActorResponse`
18+
- `LeadershipPerson`
19+
- `LeadershipRole`
20+
- `LeadershipRoleRelation`
21+
- `LeadershipTenure`
22+
- `LeadershipControlState`
23+
- `LeadershipEventLink`
1824
- `XPost`
1925
- `MapFeature`
2026
- `MapStory`
@@ -39,5 +45,6 @@ Public onboarding snapshots use an explicit allowlist. If a table is not on the
3945

4046
- Treat every published snapshot as permanently public
4147
- Add new tables to the allowlist only after an explicit review
48+
- Leadership tree data is part of the public onboarding snapshot because it is product data needed for actor dossier and graph flows
4249
- Use a dedicated read-only production connection string for publishing
4350
- Prefer restoring only app data, not full platform/system schemas

scripts/db/manifest.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ export const INCLUDED_TABLES = [
2121
'EventActorResponse',
2222
'EventSource',
2323
'IntelEvent',
24+
'LeadershipControlState',
25+
'LeadershipEventLink',
26+
'LeadershipPerson',
27+
'LeadershipRole',
28+
'LeadershipRoleRelation',
29+
'LeadershipTenure',
2430
'MapFeature',
2531
'MapStory',
2632
'MapStoryEvent',
@@ -42,6 +48,8 @@ export const REQUIRED_TABLES = [
4248
'Actor',
4349
'Conflict',
4450
'IntelEvent',
51+
'LeadershipPerson',
52+
'LeadershipRole',
4553
'XPost',
4654
] as const;
4755

0 commit comments

Comments
 (0)