coopernurse/gorp — pull request #107 by hiteshjasani (2013-11-26 20:29:07+00:00)
Title: Add function to drop individual table.  Refactor droptables to keep single codebase.

Added the ability to drop tables individually. These can be invoked as

type Foo struct {
...
}

Dbm.DropTable(Foo{})

Dbm.DropTableIfExists(Foo{})

The modifications to the existing drop table code was to prevent having multiple sections of code all doing the dropping of tables.

Lastly, dropTables(...) had a bug where it would keep dropping tables but only report an error on the last table that encountered an error being dropped. It's been changed to stop dropping tables and report on the first error encountered. I think that makes it easier for clients to determine what state they are in and figure out how to resolve the situation from there.