1
0

002_AssetStore.sql 371 B

123456789
  1. BEGIN;
  2. ALTER TABLE assets change id oldid binary(16);
  3. ALTER TABLE assets add id varchar(36) not null default '';
  4. 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));
  5. ALTER TABLE assets drop oldid;
  6. ALTER TABLE assets add constraint primary key(id);
  7. COMMIT;