Skip to content

Commit

Permalink
Make the MSSQL shared adapter correctly parse the column schema infor…
Browse files Browse the repository at this point in the history
…mation for tables in the non-default database schema
  • Loading branch information
jeremyevans committed Oct 29, 2009
1 parent fec5c0a commit 2a5bc3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/sequel/adapters/shared/mssql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a5bc3e

Please sign in to comment.