DB schema done
Migration script done
This commit is contained in:
norohind committed 2022-04-09 22:21:37 +03:00
1 parent 96b8aee9c2
commit 5955f2f093
4 files changed
+614

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
"""
Workflow to discover new squadrons (db operations):
1. Get next id
2. Query info endpoint
3. If squadron exists:
Insert squad_id into operations_info
get operation_id
Insert into squadrons_historical_data data from info endpoint
Insert into squadrons_news_historical data from news endpoint
else:
ignore, don't insert squad_id to squadrons_deleted
Workflow to update existing squadron:
1. Get most early updated squad from squadrons_current_data
2. Insert squad_id into operations_info
3. Get operation_id
4. Request info endpoint
if squad exists:
query news endpoint
insert data from info and news queries to appropriate historical tables
else:
insert squad_id, operations_id to squadrons_deleted
"""