aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Migration
diff options
context:
space:
mode:
authorSean Dague2008-04-09 02:08:07 +0000
committerSean Dague2008-04-09 02:08:07 +0000
commitea16221c1b7d7879f5d33c53bdd209803b90ed0d (patch)
treef6c1340fb9438eeb8e7868a20cb8d6ae650c699c /OpenSim/Data/NHibernate/Migration
parentfixing attributes (diff)
downloadopensim-SC_OLD-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.zip
opensim-SC_OLD-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.tar.gz
opensim-SC_OLD-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.tar.bz2
opensim-SC_OLD-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.tar.xz
NHibernate Inventory getting close, except for some of the
complex folder queries.
Diffstat (limited to 'OpenSim/Data/NHibernate/Migration')
-rwxr-xr-xOpenSim/Data/NHibernate/Migration/SqliteInventory.pl8
1 files changed, 6 insertions, 2 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,
25my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) "; 25my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) ";
26 26
27open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration"; 27open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration";
28open(WRITE,"| sqlite3 Inventory.db");
28 29
29while(my $line = <SQLITE>) { 30while(my $line = <SQLITE>) {
30 $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; 31 $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;
31 if($line =~ s/(INSERT INTO "inventoryitems")/$items/) { 32 if($line =~ s/(INSERT INTO "inventoryitems")/$items/) {
32 print $line; 33 print $line;
34 print WRITE $line;
33 } 35 }
34 if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) { 36 if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) {
35 print $line; 37 print $line;
36 } 38 print WRITE $line;
37 39 }
38} 40}
39 41
42close(WRITE);
43close(SQLITE);