rails-sqlserver-2000-2005-adapter 2.2.12 → 2.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -4,6 +4,12 @@ MASTER
4
4
  *
5
5
 
6
6
 
7
+ * 2.2.13 * (February 10th, 2009)
8
+
9
+ * Update #indexes to use unqualified table name. Fixes cases where users may decide to use table
10
+ name prefixes like 'dbo.'. [Ken Collins]
11
+
12
+
7
13
  * 2.2.12 * (February 8th, 2009)
8
14
 
9
15
  * Update table_exists? to work with qualified table names that may include an user prefix. [Ken Collins]
@@ -150,7 +150,7 @@ module ActiveRecord
150
150
  class SQLServerAdapter < AbstractAdapter
151
151
 
152
152
  ADAPTER_NAME = 'SQLServer'.freeze
153
- VERSION = '2.2.12'.freeze
153
+ VERSION = '2.2.13'.freeze
154
154
  DATABASE_VERSION_REGEXP = /Microsoft SQL Server\s+(\d{4})/
155
155
  SUPPORTED_VERSIONS = [2000,2005].freeze
156
156
  LIMITABLE_TYPES = ['string','integer','float','char','nchar','varchar','nvarchar'].freeze
@@ -501,7 +501,8 @@ module ActiveRecord
501
501
  end
502
502
 
503
503
  def indexes(table_name, name = nil)
504
- select("EXEC sp_helpindex #{quote_table_name(table_name)}",name).inject([]) do |indexes,index|
504
+ unquoted_table_name = unqualify_table_name(table_name)
505
+ select("EXEC sp_helpindex #{quote_table_name(unquoted_table_name)}",name).inject([]) do |indexes,index|
505
506
  if index['index_description'] =~ /primary key/
506
507
  indexes
507
508
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-sqlserver-2000-2005-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.12
4
+ version: 2.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins