Skip to content

Commit 3c46477

Browse files
committed
Add basic seed data for 2024 and instructions in readme
1 parent a1e9827 commit 3c46477

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
delete [UserSessionFeedback]
2+
delete [UserEventFeedback]
3+
delete [Sessions]
4+
delete TimeSlots
5+
delete Tracks
6+
delete EventDetail
7+
8+
9+
GO
10+
11+
DBCC CHECKIDENT ('[EventDetail]', RESEED, 0);
12+
DBCC CHECKIDENT ('[Tracks]', RESEED, 0);
13+
DBCC CHECKIDENT ('[TimeSlots]', RESEED, 0);
14+
DBCC CHECKIDENT ('[Sessions]', RESEED, 0);
15+
16+
GO
17+
18+
Insert into EventDetail values (1, 'kn91wz1x')
19+
20+
Insert into Tracks values (1, 'Track 1','The Junction 🚉', 0)
21+
Insert into Tracks values (1, 'Track 2','Brunel''s Boardroom 🎩🛹', 1)
22+
Insert into Tracks values (1, 'Track 3','Brunel''s Breakout room 🎩☕', 2)
23+
Insert into Tracks values (1, 'Track 4','Clock tower room ⏲', 3)
24+
25+
GO

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# PocketDDD
22

3+
# Populating Sessionize data
4+
Auto-populating the session data from Sessionize requires a basic set of seed data. An example of this can be found in [2024_SeedData.sql](PocketDDD.Server/PocketDDD.Server.DB/Migrations/2024_SeedData.sql)
5+
6+
Once this script has been run against the DB you can call the admin endpoint to refresh the data. This requires the Admin API key which can be retrieved from Azure key vault secret `pocketddd-<env>-admin-api-key`
7+
```
8+
POST /api/eventdata/RefreshFromSessionize HTTP/1.1
9+
Host: pocketddd-dev-api-server.azurewebsites.net
10+
Authorization: <insert-admin-key>
11+
```
12+
313
# Running terraform locally
414
Ensure the Azure, GitHub, and terraform CLIs are installed
515
```

0 commit comments

Comments
 (0)