uid_uri_db-create.sql 955 B

1234567891011121314151617181920212223242526
  1. INSERT INTO version (table_name, table_version) values ('uid_uri','3');
  2. CREATE TABLE uid_uri (
  3. id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
  4. uid VARCHAR(64) NOT NULL,
  5. did VARCHAR(64) NOT NULL,
  6. username VARCHAR(64) NOT NULL,
  7. flags INT UNSIGNED DEFAULT 0 NOT NULL,
  8. scheme VARCHAR(8) DEFAULT 'sip' NOT NULL
  9. ) ENGINE=MyISAM;
  10. CREATE INDEX uri_idx1 ON uid_uri (username, did, scheme);
  11. CREATE INDEX uri_uid ON uid_uri (uid);
  12. INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2');
  13. CREATE TABLE uid_uri_attrs (
  14. id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
  15. username VARCHAR(64) NOT NULL,
  16. did VARCHAR(64) NOT NULL,
  17. name VARCHAR(32) NOT NULL,
  18. value VARCHAR(128),
  19. type INT DEFAULT 0 NOT NULL,
  20. flags INT UNSIGNED DEFAULT 0 NOT NULL,
  21. scheme VARCHAR(8) DEFAULT 'sip' NOT NULL,
  22. CONSTRAINT uriattrs_idx UNIQUE (username, did, name, value, scheme)
  23. ) ENGINE=MyISAM;