# DESIGN.md — F-037 Seed Data

## Script
- `project/scripts/seed.js` — CommonJS, ejecuta con `node`
- Usa `pg` directamente (sin ORM)
- Lee DATABASE_URL del `.env`

## Approach
- INSERT ... ON CONFLICT DO UPDATE (upsert) para idempotencia
- FK constraints respetados: categorías → marcas → productos → variantes → precios → inventory
- Sin faker — datos hardcodeados realistas

## Order of inserts
1. categories_categories
2. brands_brands
3. catalog_products (+ state: active)
4. catalog_product_categories
5. catalog_product_variants
6. pricing_variant_prices
7. inventory_stock
8. shipping_zones
9. shipping_methods

## Files
- `project/scripts/seed.js`
- Actualizar `package.json` scripts: `db:seed: node scripts/seed.js`
