summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/database.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/rails/database.rb')
-rw-r--r--lib/puppet/rails/database.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/puppet/rails/database.rb b/lib/puppet/rails/database.rb
index caf87cbb8..8be05bd88 100644
--- a/lib/puppet/rails/database.rb
+++ b/lib/puppet/rails/database.rb
@@ -6,20 +6,23 @@ class Puppet::Rails::Database < ActiveRecord::Migration
ActiveRecord::Migration.verbose = false
end
- create_table :rails_objects do |table|
- table.column :name, :string, :null => false
- table.column :ptype, :string, :null => false
+ # 'type' cannot be a column name, apparently
+ create_table :rails_resources do |table|
+ table.column :title, :string, :null => false
+ table.column :restype, :string, :null => false
table.column :tags, :string
table.column :file, :string
table.column :line, :integer
table.column :host_id, :integer
- table.column :collectable, :boolean
+ table.column :exported, :boolean
end
create_table :rails_parameters do |table|
table.column :name, :string, :null => false
table.column :value, :string, :null => false
- table.column :rails_object_id, :integer
+ table.column :file, :string
+ table.column :line, :integer
+ table.column :rails_resource_id, :integer
end
create_table :hosts do |table|
@@ -33,8 +36,10 @@ class Puppet::Rails::Database < ActiveRecord::Migration
end
def self.down
- drop_table :rails_objects
+ drop_table :rails_resources
drop_table :rails_parameters
drop_table :hosts
end
end
+
+# $Id$