summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/database
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-03-11 16:30:46 -0800
committerNick Lewis <nick@puppetlabs.com>2011-03-11 16:30:46 -0800
commit37e988df4870723e66e6961fd17bff19c70e9f30 (patch)
tree44f73bbd2f5c90665e545361010a79e188c662f6 /lib/puppet/rails/database
parent8cfc8f195481bbca7c38a415ef8ba11bd20503a6 (diff)
parent8858e40839bd693420ddc791df6b51de79356d2a (diff)
downloadpuppet-37e988df4870723e66e6961fd17bff19c70e9f30.tar.gz
puppet-37e988df4870723e66e6961fd17bff19c70e9f30.tar.xz
puppet-37e988df4870723e66e6961fd17bff19c70e9f30.zip
Merge branch 'ticket/2.6.next/6689' into 2.6.next
Diffstat (limited to 'lib/puppet/rails/database')
-rw-r--r--lib/puppet/rails/database/004_add_inventory_service_tables.rb6
-rw-r--r--lib/puppet/rails/database/schema.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/rails/database/004_add_inventory_service_tables.rb b/lib/puppet/rails/database/004_add_inventory_service_tables.rb
index a819cac1a..6e6b28c0c 100644
--- a/lib/puppet/rails/database/004_add_inventory_service_tables.rb
+++ b/lib/puppet/rails/database/004_add_inventory_service_tables.rb
@@ -13,12 +13,12 @@ class AddInventoryServiceTables < ActiveRecord::Migration
unless ActiveRecord::Base.connection.tables.include?("inventory_facts")
create_table :inventory_facts, :id => false do |t|
- t.column :inventory_node_id, :integer, :null => false
+ t.column :node_id, :integer, :null => false
t.column :name, :string, :null => false
t.column :value, :text, :null => false
end
- add_index :inventory_facts, [:inventory_node_id, :name], :unique => true
+ add_index :inventory_facts, [:node_id, :name], :unique => true
end
end
@@ -29,7 +29,7 @@ class AddInventoryServiceTables < ActiveRecord::Migration
end
if ActiveRecord::Base.connection.tables.include?("inventory_facts")
- remove_index :inventory_facts, [:inventory_node_id, :name]
+ remove_index :inventory_facts, [:node_id, :name]
drop_table :inventory_facts
end
end
diff --git a/lib/puppet/rails/database/schema.rb b/lib/puppet/rails/database/schema.rb
index 9fd640fe4..7b75f4216 100644
--- a/lib/puppet/rails/database/schema.rb
+++ b/lib/puppet/rails/database/schema.rb
@@ -114,12 +114,12 @@ class Puppet::Rails::Schema
add_index :inventory_nodes, :name, :unique => true
create_table :inventory_facts, :id => false do |t|
- t.column :inventory_node_id, :integer, :null => false
+ t.column :node_id, :integer, :null => false
t.column :name, :string, :null => false
t.column :value, :text, :null => false
end
- add_index :inventory_facts, [:inventory_node_id, :name], :unique => true
+ add_index :inventory_facts, [:node_id, :name], :unique => true
end
end
ensure