diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 2e523029f539e476a6c59c9b538e845557e43436..0a74c34cd2fe7bd097b4d740f76ca006848d1acf 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -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] diff --git a/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb b/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb index 45b5d0bc96559faf1a6afe4e5b9cf9e6d5cbe47a..c43e9435b43e925d4af22d3607412b6b14f44645 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 @@ 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)