Omit internal dtproperties table from SQLServer table list. Closes #2729.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2869 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2005-11-04 06:01:03 +00:00
parent fad2aae72b
commit 4506a463e4
2 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Omit internal dtproperties table from SQLServer table list. #2729 [rtomayko@gmail.com]
* Quote column names in generated SQL. #2728 [rtomayko@gmail.com]
* Correct the pure-Ruby MySQL 4.1.1 shim's version test. #2718 [Jeremy Kemper]

View File

@ -356,9 +356,11 @@ module ActiveRecord
end
def tables(name = nil)
tables = []
execute("SELECT table_name from information_schema.tables WHERE table_type = 'BASE TABLE'", name).each {|field| tables << field[0]}
tables
execute("SELECT table_name from information_schema.tables WHERE table_type = 'BASE TABLE'", name).inject([]) do |tables, field|
table_name = field[0]
tables << table_name unless table_name == 'dtproperties'
tables
end
end
def indexes(table_name, name = nil)