Changeset [0c81dd0a1f6430ee1cc8ccfac032e5e30ed4ad90] by David Cato

October 17th, 2009 @ 03:10 AM

Don't extract the default column value twice

The column default setting, not its value, should be used when creating
a new PostgreSQLColumn because PostgreSQLColumn#initialize calls
extract_value_from_default. When called on an already extracted default
value, the result is a nil value being used instead of the actual default
value defined in the DDL, thus leading to INSERT errors when the column
has a not-NULL constraint and no value is specifed when the record is
created.
http://github.com/nofxx/postgis_adapter/commit/0c81dd0a1f6430ee1cc8...

Committed by David Cato

  • M lib/postgis_adapter.rb
  • M spec/postgis_adapter_spec.rb
  • M spec/spec_helper.rb
New-ticket Create new ticket

Create your profile

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

Postgis Adapter for ActiveRecord