opscode/chef_db — pull request #4 by schisamo (2012-08-15 02:19:10+00:00)
Title: Checksum Cleanup

**NOTE**: This PR is dependent on a FK `ON DELETE` constraint change represented by the following pull-request in `chef-sql-schema`: https://github.com/opscode/chef-sql-schema/pull/5

Properly cleaning up redundant checksums requires 2 distintive steps of related work:

### 1. Delete Redundant Checksums in Database

* **chef_sql:delete_cookbook_version/1 now cleans up checksums** - Attempt to delete all checksum records associated with a particular cookbook version relying on the fact the RDBMS will throw a foreign key constraint error *if* the checksum record is still needed. YesSQL!
* **chef_db/delete_cookbook_version/2 should expose same contract** - This function needs to return the same values, namely the 1 or 2 indicating whether the enclosing cookbook was deleted. This flag is needed for proper authz cleanup.

### 2. Delete Checksum Data in S3

COMING SOON!