FriendsStore.migrations 465 B

12345678910111213141516171819202122232425
  1. :VERSION 1 # -------------------------
  2. BEGIN;
  3. CREATE TABLE `Friends` (
  4. `PrincipalID` CHAR(36) NOT NULL,
  5. `Friend` VARCHAR(255) NOT NULL,
  6. `Flags` VARCHAR(16) NOT NULL DEFAULT 0,
  7. `Offered` VARCHAR(32) NOT NULL DEFAULT 0,
  8. PRIMARY KEY(`PrincipalID`, `Friend`),
  9. KEY(`PrincipalID`)
  10. );
  11. COMMIT;
  12. :VERSION 2 # -------------------------
  13. BEGIN;
  14. INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
  15. COMMIT;