#110 √ invalid
geekounet

Migration #27 fails using PostgreSQL 8.3

Reported by geekounet | September 24th, 2008 @ 02:28 AM

Hi,

I'm trying to install insoshi, with PostgreSQL 8.3, and I get this error during the first migration :

== 27 FixMessageParentId: migrating =========================================== -- change_column(:communications, :parent_id, :integer) rake aborted! PGError: ERROR: column "parent_id" cannot be cast to type "pg_catalog.int4" : ALTER TABLE "communications" ALTER COLUMN "parent_id" TYPE integer

I don't know if the bug comes from the postgres gem or from the migration itself... we should use the USING clause here to convert the values without error.

Comments and changes to this ticket

  • Michael Hartl

    Michael Hartl September 24th, 2008 @ 01:52 PM

    • → State changed from “new” to “invalid”

    Since the line uses the Rails-defined change_column function, this appears to be a bug in either the Postgres gem or in Rails, not in Insoshi.

    You'll have my gratitude if you can fix this. Getting everything to work with Postgres is a real pain, especially since I barely know Postgres and can't debug anything too tricky. (The Ultrasphinx plugin for search also has a Postgres bug I haven't been able to crack.)

  • Chris Powell

    Chris Powell October 31st, 2008 @ 03:46 PM

    PostgreSQL user here, too.

    Until Rails or the pg gem repairs this problem, you can work around the issue by removing migration 27 and altering migration 3 to read "t.integer :parent_id".

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket