rails/rails — pull request #10098 by subwindow (2013-04-05 01:13:46+00:00)
Title: Correctly parse bigint defaults in PostgreSQL

In Postgres, if you have a bigint column with a default value, ActiveRecord would fail to parse to default value correctly and would ignore it. The value coming out of the schema select statement was a typecasted value such as "(0)::bigint". No check was made for such a typecasted value in the default extraction code.

The main consequence of the bug (and how I discovered it) is through schema dumping. A test case is included that covers this issue. Let me know if a test closer to the root cause is required.