DPIclimate / broker

3 stars 3 forks source link

Cannot remove physical devices due to foreign key reference from the phyiscal_timeseries table #38

Closed dajtxx closed 10 months ago

dajtxx commented 1 year ago

For example:

docker exec -t prod-restapi-1 python -m broker-cli pd rm --puid 91
INFO:backoff:Backing off delete_physical_device(...) for 0.6s (api.client.DAO.DAOException: ('delete_physical_device failed.', ForeignKeyViolation('update or delete on table "physical_devices" violates foreign key constraint "physical_timeseries_physical_uid_fkey" on table "physical_timeseries"\nDETAIL:  Key (uid)=(91) is still referenced from table "physical_timeseries".\n')))
...