diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/db2_adapter.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb index 9819c5a92a..3b81c526f2 100644 --- a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb @@ -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 += "(#{c[6]})" if !c[6].nil? && c[6] != '' - result << Column.new(c_name, c_default, c_type) + result << 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 => 'int generated by default as identity primary key', + :primary_key => 'int generated by default as identity (start with 42) primary key', :string => { :name => 'varchar', :limit => 255 }, :text => { :name => 'clob', :limit => 32768 }, :integer => { :name => 'int' }, |