summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails
diff options
context:
space:
mode:
authorshadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-29 22:01:03 +0000
committershadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-29 22:01:03 +0000
commit7e62bb041185b0ddbde058a26e22f00b38add78f (patch)
tree3208ef7652d9bcb78291b71c66329455a01995e8 /lib/puppet/rails
parent6d8b3f3c9db44aea50cad8b8a13cc56d3fff2f81 (diff)
downloadpuppet-7e62bb041185b0ddbde058a26e22f00b38add78f.tar.gz
puppet-7e62bb041185b0ddbde058a26e22f00b38add78f.tar.xz
puppet-7e62bb041185b0ddbde058a26e22f00b38add78f.zip
Add updated_at for all tables
make sure it's removed from the resource hash that gets returned git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1997 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/rails')
-rw-r--r--lib/puppet/rails/database/schema.rb9
-rw-r--r--lib/puppet/rails/resource.rb2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/puppet/rails/database/schema.rb b/lib/puppet/rails/database/schema.rb
index 322e6f839..b69840eb1 100644
--- a/lib/puppet/rails/database/schema.rb
+++ b/lib/puppet/rails/database/schema.rb
@@ -13,17 +13,20 @@ class Puppet::Rails::Schema
t.column :source_file_id, :integer
t.column :exported, :boolean
t.column :line, :integer
+ t.column :updated_at, :date
end
create_table :source_files do |t|
t.column :filename, :string
t.column :path, :string
+ t.column :updated_at, :date
end
create_table :puppet_classes do |t|
t.column :name, :string
t.column :host_id, :integer
t.column :source_file_id, :integer
+ t.column :updated_at, :date
end
create_table :hosts do |t|
@@ -38,32 +41,38 @@ class Puppet::Rails::Schema
create_table :fact_names do |t|
t.column :name, :string, :null => false
t.column :host_id, :integer, :null => false
+ t.column :updated_at, :date
end
create_table :fact_values do |t|
t.column :value, :string, :null => false
t.column :fact_name_id, :integer, :null => false
+ t.column :updated_at, :date
end
create_table :param_values do |t|
t.column :value, :string, :null => false
t.column :param_name_id, :integer, :null => false
+ t.column :updated_at, :date
end
create_table :param_names do |t|
t.column :name, :string, :null => false
t.column :resource_id, :integer
t.column :line, :integer
+ t.column :updated_at, :date
end
create_table :tags do |t|
t.column :name, :string
+ t.column :updated_at, :date
end
create_table :taggings do |t|
t.column :tag_id, :integer
t.column :taggable_id, :integer
t.column :taggable_type, :string
+ t.column :updated_at, :date
end
end
$stdout.close
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index 2608daef1..bb36f161b 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -61,7 +61,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
# FIXME At some point, we're going to want to retain this information
# for logging and auditing.
hash.delete("host_id")
-
+ hash.delete("updated_at")
hash.delete("source_file_id")
hash.delete("id")
hash.each do |p, v|