[Opensim-dev] moving assets from sqlite to mysql

Charles Krinke cfk at pacbell.net
Thu Jan 17 16:01:37 UTC 2008


Please bear with me as I need to understand this completely to ensure I get it right.

The issue is how to move one or more assets from a regions AssetStorage.db in sqlite to import into a grids mysql database. Let me take the tables first. Here is the sqlite table for assets.

$ sqlite3 AssetStorage.db
sqlite> .tables
assets
sqlite> describe assets;
SQL error: near "describe": syntax error
sqlite> .schema assets
CREATE TABLE assets(UUID varchar(255) primary key,
Name varchar(255),
Description varchar(255),
Type integer,
InvType integer,
Local integer,
Temporary integer,
Data blob);
sqlite>    

mysql> describe assets;
+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| id          | binary(16)  | NO   | PRI |         |       |
| name        | varchar(64) | NO   |     |         |       |
| description| varchar(64) | NO   |     |         |       |
| assetType  | tinyint(4)  | NO   |     |         |       |
| invType    | tinyint(4)  | NO   |     |         |       |
| local      | tinyint(1)  | NO   |     |         |       |
| temporary  | tinyint(1)  | NO   |     |         |       |
| data        | longblob    | NO   |     |         |       |
+-------------+-------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
mysql>   

So, we have names that are slightly different (capitalization mainly) and types that are somewhat different.

Can one expect to do something like

1. $ sqlite3 AssetStorage > assetFile
2. $ scp assetFile computerRunningGrid
3. $ ssh computerRunningGrid
4. $ mysql 
5. $ import from assetFile to assets;

And expect all the details to be worked out?

Pardon my naivety a bit as I work through something I have not done before, but I would like to understand it completely first before fubarring anything. Also, I suspect a recipe describing this would be helpful on wiki. If I can get a recipe to work, then I will be delighted to add it to the wiki.

Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080117/d279ca85/attachment-0001.html>


More information about the Opensim-dev mailing list