Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 2a5bc3eeceff421860367056674c86708587c0a8 1 parent fec5c0a
@jeremyevans authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  CHANGELOG
  2. +1 −1  lib/sequel/adapters/shared/mssql.rb
View
2  CHANGELOG
@@ -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)
View
2  lib/sequel/adapters/shared/mssql.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.