1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

Feature #2763: Add GROUP/TEMPLATE to migrator

This commit is contained in:
Carlos Martín 2014-03-03 14:46:34 +01:00
parent e8d556caed
commit 417cf91089

View File

@ -83,6 +83,7 @@ module Migrator
# GROUP/RESOURCE_PROVIDER is not needed
# Move GROUP/QUOTA to group_quotas table
# Add GROUP/TEMPLATE
@db.run "ALTER TABLE group_pool RENAME TO old_group_pool;"
@db.run "CREATE TABLE group_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body MEDIUMTEXT, uid INTEGER, gid INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER, UNIQUE(name));"
@ -95,6 +96,8 @@ module Migrator
quotas_doc = extract_quotas(doc)
doc.root.add_child(doc.create_element("TEMPLATE"))
@db[:group_pool].insert(
:oid => row[:oid],
:name => row[:name],