up.sql 620 B

1234567891011121314
  1. CREATE TABLE emergency_access (
  2. uuid CHAR(36) NOT NULL PRIMARY KEY,
  3. grantor_uuid CHAR(36) REFERENCES users (uuid),
  4. grantee_uuid CHAR(36) REFERENCES users (uuid),
  5. email VARCHAR(255),
  6. key_encrypted TEXT,
  7. atype INTEGER NOT NULL,
  8. status INTEGER NOT NULL,
  9. wait_time_days INTEGER NOT NULL,
  10. recovery_initiated_at TIMESTAMP,
  11. last_notification_at TIMESTAMP,
  12. updated_at TIMESTAMP NOT NULL,
  13. created_at TIMESTAMP NOT NULL
  14. );