Fix old migration for postgres 8.4 environments (staging).