migrated to pg and updated teamopp model