007_RegionStore.sql 1.1 KB

12345678910111213141516171819202122232425
  1. BEGIN;
  2. ALTER TABLE prims change UUID UUIDold varchar(255);
  3. ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255);
  4. ALTER TABLE prims change CreatorID CreatorIDold varchar(255);
  5. ALTER TABLE prims change OwnerID OwnerIDold varchar(255);
  6. ALTER TABLE prims change GroupID GroupIDold varchar(255);
  7. ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255);
  8. ALTER TABLE prims add UUID char(36);
  9. ALTER TABLE prims add RegionUUID char(36);
  10. ALTER TABLE prims add CreatorID char(36);
  11. ALTER TABLE prims add OwnerID char(36);
  12. ALTER TABLE prims add GroupID char(36);
  13. ALTER TABLE prims add LastOwnerID char(36);
  14. UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold;
  15. ALTER TABLE prims drop UUIDold;
  16. ALTER TABLE prims drop RegionUUIDold;
  17. ALTER TABLE prims drop CreatorIDold;
  18. ALTER TABLE prims drop OwnerIDold;
  19. ALTER TABLE prims drop GroupIDold;
  20. ALTER TABLE prims drop LastOwnerIDold;
  21. ALTER TABLE prims add constraint primary key(UUID);
  22. ALTER TABLE prims add index prims_regionuuid(RegionUUID);
  23. COMMIT;