aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/NHibernate/Migration/SqliteInventory.pl')
-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);