mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
38
OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
Normal file
38
OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
CREATE TABLE inventoryfolders(
|
||||
folderName varchar(255),
|
||||
type integer,
|
||||
version integer,
|
||||
folderID varchar(255) primary key,
|
||||
agentID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
|
||||
parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000');
|
||||
|
||||
CREATE TABLE inventoryitems(
|
||||
assetID varchar(255),
|
||||
assetType integer,
|
||||
inventoryName varchar(255),
|
||||
inventoryDescription varchar(255),
|
||||
inventoryNextPermissions integer,
|
||||
inventoryCurrentPermissions integer,
|
||||
invType integer,
|
||||
creatorID varchar(255),
|
||||
inventoryBasePermissions integer,
|
||||
inventoryEveryOnePermissions integer,
|
||||
salePrice integer default 99,
|
||||
saleType integer default 0,
|
||||
creationDate integer default 2000,
|
||||
groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
|
||||
groupOwned integer default 0,
|
||||
flags integer default 0,
|
||||
inventoryID varchar(255) primary key,
|
||||
parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
|
||||
avatarID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
|
||||
inventoryGroupPermissions integer not null default 0);
|
||||
|
||||
create index inventoryfolders_agentid on inventoryfolders(agentID);
|
||||
create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
|
||||
create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
|
||||
create index inventoryitems_avatarid on inventoryitems(avatarID);
|
||||
|
||||
COMMIT;
|
||||
9
OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
Normal file
9
OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ATTACH 'inventoryStore.db' AS old;
|
||||
|
||||
INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
|
||||
|
||||
INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
|
||||
|
||||
COMMIT;
|
||||
@@ -29,6 +29,8 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using Mono.Data.Sqlite;
|
||||
@@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLite
|
||||
{
|
||||
public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_Realm;
|
||||
private List<string> m_ColumnNames;
|
||||
private int m_LastExpire;
|
||||
@@ -157,7 +161,7 @@ namespace OpenSim.Data.SQLite
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
m_log.Error("[SQLITE]: Exception storing authentication data", e);
|
||||
//CloseCommand(cmd);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite
|
||||
if (!m_initialized)
|
||||
{
|
||||
m_Connection = new SqliteConnection(connectionString);
|
||||
Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
|
||||
//Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
|
||||
m_Connection.Open();
|
||||
|
||||
if (storeName != String.Empty)
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace OpenSim.Data.SQLite
|
||||
public SQLiteXInventoryData(string conn, string realm)
|
||||
{
|
||||
m_Folders = new SQLiteGenericTableHandler<XInventoryFolder>(
|
||||
conn, "inventoryfolders", "InventoryStore");
|
||||
conn, "inventoryfolders", "XInventoryStore");
|
||||
m_Items = new SqliteItemHandler(
|
||||
conn, "inventoryitems", String.Empty);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using Mono.Data.SqliteClient;
|
||||
@@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||
{
|
||||
public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_Realm;
|
||||
private List<string> m_ColumnNames;
|
||||
private int m_LastExpire;
|
||||
@@ -162,7 +166,7 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
m_log.Error("[SQLITE]: Exception storing authentication data", e);
|
||||
CloseCommand(cmd);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user