aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-03-06 09:43:28 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-03-06 09:43:28 +0000
commite0cded2bbfc72ebbdae5b3c5926dc67f8fb59631 (patch)
treeb4869bdb25e278be0c9b5f5c3e10bd9cc1bbc6d6 /activerecord/lib/active_record
parent7b9824f6e2b4df7e8b6abf8720270ae755712895 (diff)
downloadrails-e0cded2bbfc72ebbdae5b3c5926dc67f8fb59631.tar.gz
rails-e0cded2bbfc72ebbdae5b3c5926dc67f8fb59631.tar.bz2
rails-e0cded2bbfc72ebbdae5b3c5926dc67f8fb59631.zip
Sybase: hide timestamp columns since they're inherently read-only. Closes #7716.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/sybase_adapter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb b/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
index 45b5d0bc96..c43e9435b4 100644
--- a/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
@@ -242,8 +242,8 @@ module ActiveRecord
SELECT col.name AS name, type.name AS type, col.prec, col.scale,
col.length, col.status, obj.sysstat2, def.text
FROM sysobjects obj, syscolumns col, systypes type, syscomments def
- WHERE obj.id = col.id AND col.usertype = type.usertype AND col.cdefault *= def.id
- AND obj.type = 'U' AND obj.name = '#{table_name}' ORDER BY col.colid
+ WHERE obj.id = col.id AND col.usertype = type.usertype AND type.name != 'timestamp'
+ AND col.cdefault *= def.id AND obj.type = 'U' AND obj.name = '#{table_name}' ORDER BY col.colid
SQLTEXT
@logger.debug "Get Column Info for table '#{table_name}'" if @logger
@connection.set_rowcount(0)