Fix SQL syntax for migration 50. It failed with PostgreSQL 9.4. (#416)

Created by  Renzo Carbonara  on December 9, 2016
RULEA52YCYFP5CSCCBXBAPOI5GYGXR73T64O6OG25YA56VBN7NQAC
Change contents