Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sybase: hide timestamp columns since they're inherently read-only. Cl…

…oses #7716.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit e0cded2bbfc72ebbdae5b3c5926dc67f8fb59631 1 parent 7b9824f
Jeremy Kemper jeremy authored
2  activerecord/CHANGELOG
View
@@ -1,5 +1,7 @@
*SVN*
+* Sybase: hide timestamp columns since they're inherently read-only. #7716 [Mike Joyce]
+
* Oracle: overflow Time to DateTime. #7718 [Michael Schoen]
* PostgreSQL: don't use async_exec and async_query with postgres-pr. #7727 [flowdelic]
4 activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
View
@@ -242,8 +242,8 @@ def columns(table_name, name = nil)
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)
Please sign in to comment.
Something went wrong with that request. Please try again.