Fixed some database schema issues.

Signed-off-by: Michael Englehorn <Michael@Englehorn.com>