Files
opengenesislinkserver/OpenSim/Data/PGSQL/Resources/InventoryStore.migrations
T
OpenGenesis (MPL 2.0) 7224b235ef feat(inventory): persistent Firestorm thumbnail upload and metadata (#124)
* feat(inventory): add authentic Firestorm InventoryThumbnailUpload two-stage JPEG2000 texture asset cap

* build(inventory): compile Firestorm thumbnail upload module in LindenCaps assembly

* docs(config): enable proper Firestorm inventory JPEG2000 upload capability by default

* test(inventory): enforce two-stage Firestorm thumbnail caps, ownership and non-temporary JPEG2000 storage

* ci(inventory): validate Firestorm thumbnail-cap registration and secure two-phase upload

* docs(release): track actual Firestorm missing thumbnail capability, asset upload and pending inventory association

* fix(inventory): disambiguate StructuredData OSDMap in Firestorm thumbnail module

* feat(inventory): add durable per-item and per-folder thumbnail UUID fields

* feat(inventory): add durable per-item and per-folder thumbnail UUID fields

* feat(inventory): add durable per-item and per-folder thumbnail UUID fields

* feat(inventory): add durable per-item and per-folder thumbnail UUID fields

* feat(inventory): round-trip thumbnail fields through XInventoryService and preserve on system-folder version updates

* db(inventory): migrate item/folder thumbnail UUIDs without dropping existing data

* db(inventory): migrate item/folder thumbnail UUIDs without dropping existing data

* db(inventory): migrate item/folder thumbnail UUIDs without dropping existing data

* feat(inventory): attach uploaded thumbnail UUID persistently to owned item/folder metadata

* feat(inventory): transmit persistent Firestorm thumbnail asset_id metadata on inventory fetch

* feat(inventory): transmit persistent Firestorm thumbnail asset_id metadata on inventory fetch

* test(inventory): verify durable thumbnail roundtrip, viewer LLSD and all three database migrations

* docs(release): record durable thumbnail metadata, additive DB migrations and mandatory relog test

* feat(inventory): carry thumbnail IDs in remote XInventory item/folder CRUD and fetch responses

* feat(inventory): persist/retrieve thumbnail UUID over Robust XInventory HTTP protocol

* test(inventory): verify thumbnail survives simulator↔Robust HTTP connector roundtrip

* docs(release): require coordinated Robust and simulator rollout for HTTP inventory thumbnail persistence

* test(inventory): execute SQLite thumbnail schema upgrade against existing inventory content

* docs(inventory): provide screenshot-specific Firestorm and outfit diagnostics plus safe schema rollout

* fix(inventory): require current root circuit and reject unsafe cross-grid thumbnail writes

* test(inventory): ensure thumbnail uploads reject HG guest inventories and stale root-agent circuits

* docs(inventory): clarify HG thumbnail ownership isolation in multi-grid deployments
2026-10-09 22:43:15 +02:00

218 lines
5.8 KiB
Plaintext

:VERSION 1
BEGIN TRANSACTION;
CREATE TABLE inventoryfolders (
"folderID" varchar(36) NOT NULL default '' PRIMARY KEY,
"agentID" varchar(36) default NULL,
"parentFolderID" varchar(36) default NULL,
"folderName" varchar(64) default NULL,
"type" smallint NOT NULL default 0,
"version" int NOT NULL default 0
);
CREATE INDEX owner ON inventoryfolders
(
"agentID" ASC
);
CREATE INDEX parent ON inventoryfolders
(
"parentFolderID" ASC
);
CREATE TABLE inventoryitems (
"inventoryID" varchar(36) NOT NULL default '' Primary Key,
"assetID" varchar(36) default NULL,
"assetType" int default NULL,
"parentFolderID" varchar(36) default NULL,
"avatarID" varchar(36) default NULL,
"inventoryName" varchar(64) default NULL,
"inventoryDescription" varchar(128) default NULL,
"inventoryNextPermissions" int default NULL,
"inventoryCurrentPermissions" int default NULL,
"invType" int default NULL,
"creatorID" varchar(36) default NULL,
"inventoryBasePermissions" int NOT NULL default 0,
"inventoryEveryOnePermissions" int NOT NULL default 0,
"salePrice" int default NULL,
"saleType" smallint default NULL,
"creationDate" int default NULL,
"groupID" varchar(36) default NULL,
"groupOwned" boolean default NULL,
"flags" int default NULL
);
CREATE INDEX ii_owner ON inventoryitems
(
"avatarID" ASC
);
CREATE INDEX ii_folder ON inventoryitems
(
"parentFolderID" ASC
);
COMMIT;
:VERSION 2
BEGIN TRANSACTION;
ALTER TABLE inventoryitems ADD "inventoryGroupPermissions" INTEGER NOT NULL default 0;
COMMIT;
:VERSION 3
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the cotext of the database designer.*/
BEGIN TRANSACTION;
CREATE TABLE Tmp_inventoryfolders
(
"folderID" uuid NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
"agentID" uuid NULL DEFAULT (NULL),
"parentFolderID" uuid NULL DEFAULT (NULL),
"folderName" varchar(64) NULL DEFAULT (NULL),
"type" smallint NOT NULL DEFAULT ((0)),
"version" int NOT NULL DEFAULT ((0))
);
INSERT INTO Tmp_inventoryfolders ("folderID", "agentID", "parentFolderID", "folderName", type, version)
SELECT cast("folderID" as uuid), cast("agentID" as uuid), cast("parentFolderID" as uuid), "folderName", "type", "version"
FROM inventoryfolders;
DROP TABLE inventoryfolders;
alter table Tmp_inventoryfolders rename to inventoryfolders;
ALTER TABLE inventoryfolders ADD CONSTRAINT
PK__inventor__C2FABFB3173876EA PRIMARY KEY
(
"folderID"
);
CREATE INDEX owner ON inventoryfolders
(
"agentID"
);
CREATE INDEX parent ON inventoryfolders
(
"parentFolderID"
);
COMMIT;
:VERSION 4
BEGIN TRANSACTION;
CREATE TABLE Tmp_inventoryitems
(
"inventoryID" uuid NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
"assetID" uuid NULL DEFAULT (NULL),
"assetType" int NULL DEFAULT (NULL),
"parentFolderID" uuid NULL DEFAULT (NULL),
"avatarID" uuid NULL DEFAULT (NULL),
"inventoryName" varchar(64) NULL DEFAULT (NULL),
"inventoryDescription" varchar(128) NULL DEFAULT (NULL),
"inventoryNextPermissions" int NULL DEFAULT (NULL),
"inventoryCurrentPermissions" int NULL DEFAULT (NULL),
"invType" int NULL DEFAULT (NULL),
"creatorID" uuid NULL DEFAULT (NULL),
"inventoryBasePermissions" int NOT NULL DEFAULT ((0)),
"inventoryEveryOnePermissions" int NOT NULL DEFAULT ((0)),
"salePrice" int NULL DEFAULT (NULL),
"SaleType" smallint NULL DEFAULT (NULL),
"creationDate" int NULL DEFAULT (NULL),
"groupID" uuid NULL DEFAULT (NULL),
"groupOwned" boolean NULL DEFAULT (NULL),
"flags" int NULL DEFAULT (NULL),
"inventoryGroupPermissions" int NOT NULL DEFAULT ((0))
);
INSERT INTO Tmp_inventoryitems ("inventoryID", "assetID", "assetType", "parentFolderID", "avatarID", "inventoryName", "inventoryDescription", "inventoryNextPermissions", "inventoryCurrentPermissions", "invType", "creatorID", "inventoryBasePermissions", "inventoryEveryOnePermissions", "salePrice", "SaleType", "creationDate", "groupID", "groupOwned", "flags", "inventoryGroupPermissions")
SELECT cast("inventoryID" as uuid), cast("assetID" as uuid), "assetType", cast("parentFolderID" as uuid), cast("avatarID" as uuid), "inventoryName", "inventoryDescription", "inventoryNextPermissions", "inventoryCurrentPermissions", "invType", cast("creatorID" as uuid), "inventoryBasePermissions", "inventoryEveryOnePermissions", "salePrice", "SaleType", "creationDate", cast("groupID" as uuid), "groupOwned", "flags", "inventoryGroupPermissions"
FROM inventoryitems ;
DROP TABLE inventoryitems;
alter table Tmp_inventoryitems rename to inventoryitems;
ALTER TABLE inventoryitems ADD CONSTRAINT
PK__inventor__C4B7BC2220C1E124 PRIMARY KEY
(
"inventoryID"
);
CREATE INDEX ii2_owner ON inventoryitems
(
"avatarID"
);
CREATE INDEX ii2_folder ON inventoryitems
(
"parentFolderID"
);
COMMIT;
:VERSION 5
BEGIN TRANSACTION;
-- # Restoring defaults:
-- # NOTE: "inventoryID" does NOT need one: it's NOT NULL PK and a unique Guid must be provided every time anyway!
alter table inventoryitems
alter column "inventoryBasePermissions" set default 0;
alter table inventoryitems
alter column "inventoryEveryOnePermissions" set default 0;
alter table inventoryitems
alter column "inventoryGroupPermissions" set default 0 ;
COMMIT ;
:VERSION 8
ALTER TABLE inventoryitems
alter column "creatorID" set DEFAULT '00000000-0000-0000-0000-000000000000';
:VERSION 9
BEGIN TRANSACTION;
alter table inventoryitems
alter column "creatorID" type varchar(255);
Commit;
:VERSION 10
BEGIN TRANSACTION;
Alter table inventoryitems Rename Column "SaleType" to "saleType";
Commit;
:VERSION 11
BEGIN TRANSACTION;
ALTER TABLE inventoryitems
ADD COLUMN "thumbnailID" uuid NOT NULL
DEFAULT '00000000-0000-0000-0000-000000000000';
ALTER TABLE inventoryfolders
ADD COLUMN "thumbnailID" uuid NOT NULL
DEFAULT '00000000-0000-0000-0000-000000000000';
COMMIT;