009_RegionStore.sql 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. BEGIN;
  2. ALTER TABLE primitems change itemID itemIDold varchar(255);
  3. ALTER TABLE primitems change primID primIDold varchar(255);
  4. ALTER TABLE primitems change assetID assetIDold varchar(255);
  5. ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255);
  6. ALTER TABLE primitems change creatorID creatorIDold varchar(255);
  7. ALTER TABLE primitems change ownerID ownerIDold varchar(255);
  8. ALTER TABLE primitems change groupID groupIDold varchar(255);
  9. ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255);
  10. ALTER TABLE primitems add itemID char(36);
  11. ALTER TABLE primitems add primID char(36);
  12. ALTER TABLE primitems add assetID char(36);
  13. ALTER TABLE primitems add parentFolderID char(36);
  14. ALTER TABLE primitems add creatorID char(36);
  15. ALTER TABLE primitems add ownerID char(36);
  16. ALTER TABLE primitems add groupID char(36);
  17. ALTER TABLE primitems add lastOwnerID char(36);
  18. UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold;
  19. ALTER TABLE primitems drop itemIDold;
  20. ALTER TABLE primitems drop primIDold;
  21. ALTER TABLE primitems drop assetIDold;
  22. ALTER TABLE primitems drop parentFolderIDold;
  23. ALTER TABLE primitems drop creatorIDold;
  24. ALTER TABLE primitems drop ownerIDold;
  25. ALTER TABLE primitems drop groupIDold;
  26. ALTER TABLE primitems drop lastOwnerIDold;
  27. ALTER TABLE primitems add constraint primary key(itemID);
  28. ALTER TABLE primitems add index primitems_primid(primID);
  29. COMMIT;