Skip to main content

How do I test and document seeds?

Changelog

To test and document seeds, use a schema file and nest the configurations under a seeds: key

Example:#

data/schema.yml
version: 2
seeds:  - name: country_codes    description: A mapping of two letter country codes to country names    columns:      - name: country_code        tests:          - unique          - not_null      - name: country_name        tests:          - unique          - not_null