mhoppa commented on issue #3966: Add server capabilities API
URL: https://github.com/apache/trafficcontrol/pull/3966#issuecomment-540058711
 
 
   > > without reading thru the code, does DELETE validate that the "server 
capability" is:
   > 
   > > a. not being used by any server and
   > > b. is not required by any ds
   > 
   > Server-Capabilities and DS-Required-Capabilities don't exist in this PR, 
that'll have to be added in a subsequent PR.
   > 
   > But, I'd vote we don't add custom Go logic to handle that - rather, if we 
make them proper Foreign Keys that don't CASCADE DELETE, the DB will 
automatically prevent it. Then, all we have to do is parse the Postgres error 
to return a useful message to the user (we already have a func for that 
`api.ParseDBError`
   
   FWIW Did add that constraint to my PR per @rawlinp feedback 
https://github.com/apache/trafficcontrol/pull/3964/files#diff-7d3547a278b38f437ab01966666c94a8R26

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to