use TRUE in SQL for boolean var

The "allocated" variable was defined to be a boolean type
and in postgresql this type is enforced,
while in mysql this just maps to tinyint and accepts both numbers and bools

Closes-Bug: #1368251
Change-Id: If324c8b83e490e150085d044ac61360b647522ac
(cherry picked from commit b030300b1687b853a95b6bd2e706045f549d1e50)
Merge "use TRUE in SQL for boolean var" into stable/icehouse