Permalink
Browse files

Make the MSSQL shared adapter correctly parse the column schema infor…

…mation for tables in the non-default database schema
  • Loading branch information...
1 parent fec5c0a commit 2a5bc3eeceff421860367056674c86708587c0a8 @jeremyevans committed Oct 29, 2009
Showing with 3 additions and 1 deletion.
  1. +2 −0 CHANGELOG
  2. +1 −1 lib/sequel/adapters/shared/mssql.rb
View
@@ -1,5 +1,7 @@
=== HEAD
+* Make the MSSQL shared adapter correctly parse the column schema information for tables in the non-default database schema (rohit.namjoshi)
+
* Use save_changes instead of save when updating existing associated objects in the nested_attributes plugin (jeremyevans)
* Allow Model#save_changes to accept an option hash that is passed to save, so you can save changes without validating (jeremyevans)
@@ -128,7 +128,7 @@ def schema_parse_table(table_name, opts)
select(:column_name___column, :data_type___db_type, :character_maximum_length___max_chars, :column_default___default, :is_nullable___allow_null).
filter(:c__table_name=>m2.call(table_name.to_s))
if schema = opts[:schema] || default_schema
- ds.filter!(:table_schema=>schema)
+ ds.filter!(:c__table_schema=>schema)
end
ds.map do |row|
row[:allow_null] = row[:allow_null] == 'YES' ? true : false

0 comments on commit 2a5bc3e

Please sign in to comment.