Fix string type for PostgreSQL #14

Merged
merged 1 commit into from Jun 6, 2012

3 participants

@mhuggins

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
@kunklejr

Now available through npm in version 0.1.2

@mhuggins

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

@ricksixhops

I think it was a mistake to make this change. There is no performance difference between varchar and text in Postgres (see here: http://www.postgresql.org/docs/9.0/static/datatype-character.html) 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