<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *SVN*
 
+* Fixed DB2 adapter so nullable columns will be determines correctly now and quotes from column default values will be removed #4350 [contact@maik-schmidt.de]
+
 * Allow overriding of find parameters in scoped has_many :through calls [Rick Olson]
 
   In this example, :include =&gt; false disables the default eager association from loading.  :select changes the standard</diff>
      <filename>activerecord/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -146,9 +146,10 @@ begin
             stmt.columns(table_name, schema).each do |c| 
               c_name = c[3].downcase
               c_default = c[12] == 'NULL' ? nil : c[12]
+              c_default.gsub!(/^'(.*)'$/, '\1') if !c_default.nil?
               c_type = c[5].downcase
               c_type += &quot;(#{c[6]})&quot; if !c[6].nil? &amp;&amp; c[6] != ''
-              result &lt;&lt; Column.new(c_name, c_default, c_type)
+              result &lt;&lt; Column.new(c_name, c_default, c_type, c[17] == 'YES')
             end 
           end
           result
@@ -156,7 +157,7 @@ begin
 
         def native_database_types
           {
-            :primary_key =&gt; 'int generated by default as identity primary key',
+            :primary_key =&gt; 'int generated by default as identity (start with 42) primary key',
             :string      =&gt; { :name =&gt; 'varchar', :limit =&gt; 255 },
             :text        =&gt; { :name =&gt; 'clob', :limit =&gt; 32768 },
             :integer     =&gt; { :name =&gt; 'int' },</diff>
      <filename>activerecord/lib/active_record/connection_adapters/db2_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1190,8 +1190,8 @@ class BasicsTest &lt; Test::Unit::TestCase
     else
       assert xml.include?(%(&lt;last-read type=&quot;date&quot;&gt;2004-04-15&lt;/last-read&gt;))
     end
-    # Oracle doesn't have true boolean or time-only fields
-    unless current_adapter?(:OracleAdapter)
+    # Oracle and DB2 don't have true boolean or time-only fields
+    unless current_adapter?(:OracleAdapter) || current_adapter?(:DB2Adapter)
       assert xml.include?(%(&lt;approved type=&quot;boolean&quot;&gt;false&lt;/approved&gt;)), &quot;Approved should be a boolean&quot;
       assert xml.include?(%(&lt;bonus-time type=&quot;datetime&quot;&gt;#{bonus_time_in_current_timezone}&lt;/bonus-time&gt;))
     end</diff>
      <filename>activerecord/test/base_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f46eb2ab64b43bdf8d03683904de2cd97b73d0de</id>
    </parent>
  </parents>
  <author>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/2d24bed3a072aac1a0087ec4c4681889e49ea6a4</url>
  <id>2d24bed3a072aac1a0087ec4c4681889e49ea6a4</id>
  <committed-date>2006-03-22T11:30:02-08:00</committed-date>
  <authored-date>2006-03-22T11:30:02-08:00</authored-date>
  <message>Fixed DB2 adapter so nullable columns will be determines correctly now and quotes from column default values will be removed (closes #4350) [contact@maik-schmidt.de]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de</message>
  <tree>92e365cc4d36b46c00d6e20119e2ed6cfe1e46b1</tree>
  <committer>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </committer>
</commit>
