Full local DB reset (DEPRECATED) - RodrigoMattosoSilveira/EnterpriseRemoteSystems GitHub Wiki
From the project root:
cd /Users/rodrigosilveira/projects/EnterpriseRemoteSystems
Stop local backend/frontend processes:
PIDS="$(lsof -tiTCP:8080 -tiTCP:5173 2>/dev/null || true)"
if [ -n "$PIDS" ]; then
kill -9 $PIDS
fi
Back up the current local databases:
mkdir -p backend/data/backups
cp backend/data/app.db "backend/data/backups/app.$(date +%Y%m%d-%H%M%S).db" 2>/dev/null || true
cp backend/data/app-e2e.db "backend/data/backups/app-e2e.$(date +%Y%m%d-%H%M%S).db" 2>/dev/null || true
Delete the local databases:
rm -f backend/data/app.db
rm -f backend/data/app-e2e.db
Restart the local backend so migrations and seed data run again:
make local-backend
Then, in another terminal, run:
make local-check
This gives you a fresh local database with schema and seed/reference data recreated.