public UserMigration(string connectString, string userServiceUrl, string gridOwner) { using (m_connection = new MySqlConnection(connectString)) { using (m_db = new opensim(m_connection)) { m_userUrl = userServiceUrl; m_userUrl = userServiceUrl; var users = from u in m_db.useraccounts select u; foreach (var user in users) { CreateUser(user, gridOwner); Console.Write("+"); } } } if (!m_masterUserSet) { Console.WriteLine("No grid owner set. You should manually assign one user to have an access level of 255 in the database"); } }
public InventoryMigration(string connectString, string inventoryServiceUrl, string userServiceUrl) { using (m_connection = new MySqlConnection(connectString)) { using (m_db = new opensim(m_connection)) { m_inventoryUrl = inventoryServiceUrl; m_userUrl = userServiceUrl; var rootFolders = from i in m_db.inventoryfolders where i.parentFolderID == UUID_ZERO select i; foreach (var rootFolder in rootFolders) { // SimianGrid uses UserIDs as root inventory folderIDs. Rewrite all of the // root folderIDs m_rewriteFolderIDs[rootFolder.folderID] = rootFolder.agentID; CreateFolder(rootFolder); m_counter = 0; Console.Write("+"); } } } }
private void CreateAssetSet(string lstr, string hstr) { string query = String.Format("SELECT * FROM assets where id > '{0}' and id <= '{1}'", lstr, hstr); Console.WriteLine(String.Empty); Console.WriteLine(query); using (m_db = new opensim(m_connection)) { var assets = m_db.ExecuteQuery <assets>(query); int count = 0; foreach (var asset in assets) { CreateAsset(asset); if (++count % 10 == 0) { Console.Write("."); } } } }
public FriendMigration(string connectString, string userServiceUrl) { using (m_connection = new MySqlConnection(connectString)) { using (m_db = new opensim(m_connection)) { m_userUrl = userServiceUrl; m_userUrl = userServiceUrl; var friends = from f in m_db.userfriends select f; int i = 0; foreach (var friend in friends) { CreateFriend(friend); if (++i % 100 == 0) { Console.Write("+"); } } } } }