Turfi Platform Documentation
Official Turfi documentation portal for users, admins, and developers.
Documentation Search
Search only within Turfi documentation pages.
C
Import Contract
Global CSV contract rules.
Global Rules
- CSV imports must map into documented entity contracts only.
- Raw database UUID columns are allowed only when the contract explicitly lists direct
*_idsupport. - Human-readable relationship input must never be written directly to FK columns without resolution.
Column Naming Conventions
*_key: resolve against the target tablekeycolumn first.- Non-suffixed relationship fields such as
organization,league,season,club,team, orvenue: resolve bykey, thenslug, thenname. - Shared address fields use normalized address inputs such as
address_line1,city,province,postal_code, andcountryrather than expecting a directaddress_idfrom operators. - Lookup-backed fields should prefer canonical keys when supplied by CSV.
Resolution Order
- Direct id, if the contract allows it and the CSV maps to an
*_idfield. *_keylookup against the target tablekeycolumn.- Non-suffixed relationship field resolved by
key. - Fallback to
slug. - Fallback to
name.
Validation Flow
- Column mapping must resolve to documented accepted columns only.
- Required fields are checked before row writes.
- Relationship and lookup values are normalized or paused for review before DB validation.
- Fail-fast relationships reject the row instead of silently persisting null foreign keys.
- Database constraints remain authoritative after import-layer normalization completes.