FriendsStore.migrations 395 B

1234567891011121314151617181920
  1. :VERSION 1
  2. BEGIN TRANSACTION;
  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. COMMIT;
  10. :VERSION 2
  11. BEGIN TRANSACTION;
  12. INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
  13. COMMIT;