# Gancio — Notes ## "Non empty db" crash on re-deploy Gancio stores its setup state in `config.json` on the data PVC. If the PVC is lost or the app is deleted and redeployed against an existing database, Gancio finds a non-empty DB but no `config.json` and refuses to start: `"Non empty db! Please move your current db elsewhere than retry."` **Fix**: drop and recreate the public schema, then restart the deployment: ```bash kubectl exec -n postgres -- psql -U postgres gancio \ -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO gancio; GRANT ALL ON SCHEMA public TO public;" kubectl scale deployment -n gancio gancio --replicas=0 # wait for pod to terminate kubectl scale deployment -n gancio gancio --replicas=1 ``` Scale down before dropping the schema to release the database connection first. This only affects re-deployments; fresh installs work fine.