Use six.text_type() instead of str() in sqlalchemy backend

Change-Id: Ie78d2890ce008f22c94e705dbb489838375d303d
Merge "Use six.text_type() instead of str() in sqlalchemy backend"