From ea16221c1b7d7879f5d33c53bdd209803b90ed0d Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 9 Apr 2008 02:08:07 +0000 Subject: NHibernate Inventory getting close, except for some of the complex folder queries. --- OpenSim/Data/NHibernate/Migration/SqliteInventory.pl | 8 ++++++-- OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 2 +- OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml | 6 +++--- OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl b/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl index d8698f4..c59cbce 100755 --- a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl +++ b/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl @@ -25,15 +25,19 @@ my $items = "INSERT INTO InventoryItems(ID, AssetID, AssetType, InvType, Folder, my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) "; open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration"; +open(WRITE,"| sqlite3 Inventory.db"); while(my $line = ) { $line =~ s/([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})/$1-$2-$3-$4-$5/g; if($line =~ s/(INSERT INTO "inventoryitems")/$items/) { print $line; + print WRITE $line; } if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) { print $line; - } - + print WRITE $line; + } } +close(WRITE); +close(SQLITE); diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 9e35b76..8bc41c9 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs @@ -77,7 +77,7 @@ namespace OpenSim.Data.NHibernate HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); - new SchemaExport(cfg).Create(true, true); + // new SchemaExport(cfg).Create(true, true); factory = cfg.BuildSessionFactory(); } diff --git a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml index d24d312..4de0b7c 100644 --- a/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/InventoryFolderBase.hbm.xml @@ -1,13 +1,13 @@ - + - - + + \ No newline at end of file diff --git a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml index 8a0fb69..c4e9b01 100644 --- a/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml +++ b/OpenSim/Data/NHibernate/Resources/InventoryItemBase.hbm.xml @@ -7,8 +7,8 @@ - - + + -- cgit v1.1