started adding postgresql support to models

TODO need to fix id bug with postgresql