1.1 KiB
1.1 KiB
Product seed CSV template
Use products_seed_template.csv to author product seed data that can be imported into the Dexie database. Populate one row per product and ensure the category column contains the product's category name.
Columns
- name: Product display name.
- category: Category label for the product. Codex will generate the category table from the unique values in this column.
- unit_type: Unit of measure (e.g.,
units,packs,bottles). - bulk_name: Label for the bulk unit (e.g.,
carton,box). - units_per_bulk: Number of individual units contained in a bulk item.
- barcode: Optional barcode string. Leave blank if unknown.
- archived:
trueorfalseto indicate whether the product is archived.
Usage flow for Codex
- Read
products_seed_template.csv. - Seed
productswith the CSV rows (generate UUIDs and timestamps per record). - Build a unique, alphabetized list of categories from the
categorycolumn and seed thecategoriestable with those values (UUIDs plus timestamps). - If necessary, seed
areasseparately using the existing defaults insrc/db/seed.tsor an equivalent CSV.