Adding STATUSES table, make reference to SQL table names and columns all capitals.
Make databse table names and columns lower case, seems like the conventions for postgres, fix off by one error in task view