mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Bug #1119: set right values for uid,gid columns in migrator 3.1.80_to_3.2.0
This commit is contained in:
parent
c03b78732f
commit
03ddf136b7
@ -162,12 +162,19 @@ module Migrator
|
||||
@db.run "CREATE TABLE IF NOT EXISTS user_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body TEXT, uid INTEGER, gid INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER, UNIQUE(name));"
|
||||
|
||||
@db.fetch("SELECT * FROM old_user_pool") do |row|
|
||||
doc = Document.new(row[:body])
|
||||
|
||||
gid = "1"
|
||||
doc.root.each_element("GID") { |e|
|
||||
gid = e.text
|
||||
}
|
||||
|
||||
@db[:user_pool].insert(
|
||||
:oid => row[:oid],
|
||||
:name => row[:name],
|
||||
:body => row[:body],
|
||||
:uid => "0",
|
||||
:gid => row[:oid],
|
||||
:uid => row[:oid],
|
||||
:gid => gid,
|
||||
:owner_u => "1",
|
||||
:group_u => "0",
|
||||
:other_u => "0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user