Skip to content

Commit

Permalink
Do not force updated_at
Browse files Browse the repository at this point in the history
Signed-off-by: rick <technoweenie@gmail.com>
  • Loading branch information
ngocdaothanh authored and technoweenie committed Jan 10, 2009
1 parent bc013f3 commit 69ddb16
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/acts_as_versioned.rb
Expand Up @@ -416,9 +416,7 @@ def create_versioned_table(create_table_options = {})
t.column version_column, :integer
end

updated_col = nil
self.versioned_columns.each do |col|
updated_col = col if !updated_col && %(updated_at updated_on).include?(col.name)
self.connection.add_column versioned_table_name, col.name, col.type,
:limit => col.limit,
:default => col.default,
Expand All @@ -433,10 +431,6 @@ def create_versioned_table(create_table_options = {})
:scale => type_col.scale,
:precision => type_col.precision
end

if updated_col.nil?
self.connection.add_column versioned_table_name, :updated_at, :timestamp
end

self.connection.add_index versioned_table_name, versioned_foreign_key
end
Expand Down

0 comments on commit 69ddb16

Please sign in to comment.