mirror of
https://github.com/opensim/opensim.git
synced 2026-07-20 22:55:38 +08:00
the beginning of the great id format migration. This makes
asset uuids no longer binary. I've tested this migration a few times, and it seems working in all the scenarios I've found but it wouldn't hurt to backup your asset db before running this as it does touch a very sensitive part of our content system.
This commit is contained in:
9
OpenSim/Data/MySQL/Resources/002_AssetStore.sql
Normal file
9
OpenSim/Data/MySQL/Resources/002_AssetStore.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE assets change id oldid binary(16);
|
||||
ALTER TABLE assets add id varchar(36) not null default '';
|
||||
UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12));
|
||||
ALTER TABLE assets drop oldid;
|
||||
ALTER TABLE assets add constraint primary key(id);
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user