Wiping Data & Restarting
Use this when you need to completely reset the database (testing, starting fresh, etc.).
⚠️ WARNING: This Deletes ALL Data
Complete wipe (all data lost):
# Step 1: Stop services and delete volumes
docker compose down -v
# Step 2: Verify volumes removed
docker volume ls | grep claw-machine-manager
# Step 3: Start fresh
docker compose up -d
# Step 4: Wait for healthy database
docker compose ps
# Step 5: Load schema
docker exec -i inventory-db psql -U inventory_user -d inventory < db/schema.sql
# Step 6: Verify
docker exec inventory-db psql -U inventory_user -d inventory -c "\dt"
Alternative: Wipe Without Stopping
If you want to keep containers running:
# Step 1: Drop and recreate database
docker exec inventory-db psql -U inventory_user -d inventory -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
# Step 2: Reload schema
docker exec -i inventory-db psql -U inventory_user -d inventory < db/schema.sql
# Step 3: Restart backend to clear any cached data
docker compose restart backend