From 8a58932e05db9660932784335c9fa07ace7eaa93 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sun, 23 Dec 2012 23:30:50 +0100 Subject: [PATCH] Revert "Feature #1326: onedb migrator adds template attribute TEMPLATE_NAME" This reverts commit d73d349d6fdbaa76a747ebdeacab54a5813cb718. --- src/onedb/3.8.1_to_3.9.80.rb | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/onedb/3.8.1_to_3.9.80.rb b/src/onedb/3.8.1_to_3.9.80.rb index afe86b2a35..6c4f489615 100644 --- a/src/onedb/3.8.1_to_3.9.80.rb +++ b/src/onedb/3.8.1_to_3.9.80.rb @@ -259,34 +259,6 @@ module Migrator @db.run "DROP TABLE old_group_pool;" - ######################################################################## - # Feature #1326 - ######################################################################## - - @db.run "ALTER TABLE template_pool RENAME TO old_template_pool;" - @db.run "CREATE TABLE template_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body TEXT, uid INTEGER, gid INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER);" - - @db.fetch("SELECT * FROM old_template_pool") do |row| - doc = Document.new(row[:body]) - - doc.root.each_element("TEMPLATE") { |e| - e.add_element("TEMPLATE_NAME").text = row[:name] - } - - @db[:template_pool].insert( - :oid => row[:oid], - :name => row[:name], - :body => doc.root.to_s, - :uid => row[:uid], - :gid => row[:gid], - :owner_u => row[:owner_u], - :group_u => row[:group_u], - :other_u => row[:other_u]) - end - - @db.run "DROP TABLE old_template_pool;" - - ######################################################################## # # Banner for the new /var/lib/one/vms directory