mbucc / shmig

Database migration tool written in BASH.
BSD 3-Clause "New" or "Revised" License
461 stars 50 forks source link

Replace PostgreSQL function used to pad timestamp #7

Closed ubergesundheit closed 9 years ago

ubergesundheit commented 9 years ago

I was experiencing the following error with PostgreSQL 9.4.1:

ERROR:  function lpad(integer, integer, unknown) does not exist at character 8

The lpad function is lpad(string text, length int [, fill text]) and the version field is of type integer.

This seems to fix the error for me. I tested with two migration files, 999999999-test1.sql and 1000000000-test2.sql which seems to work as intended.

mbucc commented 9 years ago

Looks good, thanks!