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.pl43
1 files changed, 0 insertions, 43 deletions
diff --git a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl b/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl
deleted file mode 100755
index c59cbce..0000000
--- a/OpenSim/Data/NHibernate/Migration/SqliteInventory.pl
+++ /dev/null
@@ -1,43 +0,0 @@
1#!/usr/bin/perl
2
3# -- CREATE TABLE inventoryitems(UUID varchar(255) primary key,
4# -- assetID varchar(255),
5# -- assetType integer,
6# -- invType integer,
7# -- parentFolderID varchar(255),
8# -- avatarID varchar(255),
9# -- creatorsID varchar(255),
10# -- inventoryName varchar(255),
11# -- inventoryDescription varchar(255),
12# -- inventoryNextPermissions integer,
13# -- inventoryCurrentPermissions integer,
14# -- inventoryBasePermissions integer,
15# -- inventoryEveryOnePermissions integer);
16
17# -- CREATE TABLE inventoryfolders(UUID varchar(255) primary key,
18# -- name varchar(255),
19# -- agentID varchar(255),
20# -- parentID varchar(255),
21# -- type integer,
22# -- version integer);
23
24my $items = "INSERT INTO InventoryItems(ID, AssetID, AssetType, InvType, Folder, Owner, Creator, Name, Description, NextPermissions, CurrentPermissions, BasePermissions, EveryOnePermissions) ";
25my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) ";
26
27open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration";
28open(WRITE,"| sqlite3 Inventory.db");
29
30while(my $line = <SQLITE>) {
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;
32 if($line =~ s/(INSERT INTO "inventoryitems")/$items/) {
33 print $line;
34 print WRITE $line;
35 }
36 if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) {
37 print $line;
38 print WRITE $line;
39 }
40}
41
42close(WRITE);
43close(SQLITE);