From 484584b83ce96825c49ccf7c9c129a3961e5c223 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 4 May 2010 09:44:30 -0700 Subject: Fixed: migration #2 for SQLite. Problem was that ATTACH cannot be done inside a transaction. --- OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Data/SQLite/Resources') diff --git a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql index 545d233..d38e2b7 100644 --- a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql +++ b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql @@ -1,9 +1,8 @@ -BEGIN TRANSACTION; +ATTACH 'inventoryStore.db' AS old; -ATTACH 'inventoryStore.db' AS old; +BEGIN TRANSACTION; 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; -- cgit v1.1