Upserts should deal with missing relationships
kiwicopple opened this issue · comments
Copple commented
Chore
Describe the chore
- the schema has a relationships between tables
- if we try to upsert data which is missing foreign data then the upsert will fail (i.e. we might be backfilling the data while a webhook is called)
- when we are upserting records, we should check that the related data exists first
- if it doesnt exist, fetch it from Stripe and upsert it