p≡p engine fork for my own dirty testing of stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
816 B

  1. create table trust (
  2. user_id text references person (id) on delete cascade,
  3. pgp_keypair_fpr text references pgp_keypair (fpr) on delete cascade,
  4. comm_type integer not null,
  5. comment text
  6. );
  7. create unique index trust_index on trust (
  8. user_id,
  9. pgp_keypair_fpr
  10. );
  11. insert into trust (user_id, pgp_keypair_fpr, comm_type)
  12. select user_id, main_key_id, comm_type from identity;
  13. alter table identity rename to identity_old;
  14. create table identity (
  15. address text primary key,
  16. user_id text
  17. references person (id)
  18. on delete cascade,
  19. main_key_id text
  20. references pgp_keypair (fpr)
  21. on delete set null,
  22. comment text
  23. );
  24. insert into identity (address, user_id, main_key_id)
  25. select address, user_id, main_key_id from identity_old;
  26. drop table identity_old;