diff options
author | Sean Dague | 2008-04-09 02:08:07 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-09 02:08:07 +0000 |
commit | ea16221c1b7d7879f5d33c53bdd209803b90ed0d (patch) | |
tree | f6c1340fb9438eeb8e7868a20cb8d6ae650c699c /OpenSim/Data/NHibernate/Migration | |
parent | fixing attributes (diff) | |
download | opensim-SC-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.zip opensim-SC-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.tar.gz opensim-SC-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.tar.bz2 opensim-SC-ea16221c1b7d7879f5d33c53bdd209803b90ed0d.tar.xz |
NHibernate Inventory getting close, except for some of the
complex folder queries.
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); | ||