diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 02:08:11 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 02:08:11 +0000 |
| commit | dc5f4dc0d01dc2ccb4679afbf3802a7ab0f3c126 (patch) | |
| tree | 6082433e05ad445aa4323a05de7d5820c5c023d6 /lib/puppet/rails/database | |
| parent | 5a52855c1da2cb4716587bf0223c6d20eddaf00a (diff) | |
| download | puppet-dc5f4dc0d01dc2ccb4679afbf3802a7ab0f3c126.tar.gz puppet-dc5f4dc0d01dc2ccb4679afbf3802a7ab0f3c126.tar.xz puppet-dc5f4dc0d01dc2ccb4679afbf3802a7ab0f3c126.zip | |
Fixing most of the rails stuff. I think everything basically works now, and now I am just going through and making sure things get deleted when they are supposed (i.e., you remove a resource and it gets deleted from the host's config).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1950 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/rails/database')
| -rw-r--r-- | lib/puppet/rails/database/schema.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/puppet/rails/database/schema.rb b/lib/puppet/rails/database/schema.rb index 546ad73fb..322e6f839 100644 --- a/lib/puppet/rails/database/schema.rb +++ b/lib/puppet/rails/database/schema.rb @@ -1,17 +1,18 @@ class Puppet::Rails::Schema def self.init oldout = nil - Puppet::Util.benchmark(:notice, "Initialized database") do + Puppet::Util.benchmark(Puppet, :notice, "Initialized database") do # We want to rewrite stdout, so we don't get migration messages. oldout = $stdout $stdout = File.open("/dev/null", "w") ActiveRecord::Schema.define do create_table :resources do |t| t.column :title, :string, :null => false - t.column :restype, :string + t.column :restype, :string, :null => false t.column :host_id, :integer t.column :source_file_id, :integer t.column :exported, :boolean + t.column :line, :integer end create_table :source_files do |t| @@ -52,6 +53,7 @@ class Puppet::Rails::Schema create_table :param_names do |t| t.column :name, :string, :null => false t.column :resource_id, :integer + t.column :line, :integer end create_table :tags do |t| @@ -64,9 +66,12 @@ class Puppet::Rails::Schema t.column :taggable_type, :string end end + $stdout.close + $stdout = oldout + oldout = nil end ensure - $stdout = oldout + $stdout = oldout if oldout end end |
