Fix string type for PostgreSQL #14

merged 1 commit into from Jun 6, 2012

3 participants


node-db-migrate is currently treating 'string' types as TEXT in Postgres. This should be a VARCHAR instead.

@kunklejr kunklejr merged commit 7ecf028 into db-migrate:master Jun 6, 2012

Now available through npm in version 0.1.2


Thanks! Got a couple more pull requests coming your way. :)


I think it was a mistake to make this change. There is no performance difference between varchar and text in Postgres (see here: and the Postgres community is pretty strongly on the side of always using text over varchar.

I'd recommend restoring the Postgres mapping of STRING to TEXT, and if someone really wants/needs to use VARCHAR they can specify that type (or "CHARACTER VARYING") explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment