diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Data/NHibernate/Migration/SqliteInventory.pl | 8 |
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, | |||
25 | my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) "; | 25 | my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) "; |
26 | 26 | ||
27 | open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration"; | 27 | open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration"; |
28 | open(WRITE,"| sqlite3 Inventory.db"); | ||
28 | 29 | ||
29 | while(my $line = <SQLITE>) { | 30 | while(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 | ||
42 | close(WRITE); | ||
43 | close(SQLITE); | ||