Seeder
The seeder populates the database from site data and CSV files.
Build
cd db/seedergo build -o seeder .Usage
./seeder [flags]
Flags: --db-url string SQLite database file path (default: "redecasas.db") --site-dir string Path to site/ directory (default: "../site") --csv-file string Path to 404 CSV file (default: "../Table.csv") --d1-export string Path to D1 SQL export (optional) --phase string Phase to run: all | geographic | scopes | pages | content | blog | agents | notfound | d1 --batch-size int INSERT batch size (default: 1000) --workers int Parallel workers (default: 8) --skip-content Skip HTML content cache seeding (saves time)Phases
| Phase | What It Does |
|---|---|
all | Run all phases (default) |
geographic | Seed regions, states, cities |
scopes | Seed scopes and topics |
pages | Generate page records for all URL combinations |
content | Seed HTML content cache |
blog | Seed blog themes and posts |
agents | Seed real estate agents |
notfound | Import 404 CSV data |
d1 | Export D1-compatible SQL |
Example
# Full seed./seeder --db-url="../redecasas.db" --site-dir="../site" --csv-file="../Table.csv"
# Quick seed (skip content cache)./seeder --skip-content
# Only geographic data./seeder --phase=geographic