ims_usrloc_scscf-create.sql 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. INSERT INTO version (table_name, table_version) values ('contact','6');
  2. CREATE TABLE `contact` (
  3. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  4. `contact` char(255) NOT NULL,
  5. `params` varchar(255) DEFAULT NULL,
  6. `path` varchar(255) DEFAULT NULL,
  7. `received` varchar(255) DEFAULT NULL,
  8. `user_agent` varchar(255) DEFAULT NULL,
  9. `expires` datetime DEFAULT NULL,
  10. `callid` varchar(255) DEFAULT NULL,
  11. PRIMARY KEY (`id`),
  12. UNIQUE KEY `contact` (`contact`)
  13. );
  14. INSERT INTO version (table_name, table_version) values ('impu','6');
  15. CREATE TABLE `impu` (
  16. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  17. `impu` char(64) NOT NULL,
  18. `barring` int(1) DEFAULT '0',
  19. `reg_state` int(11) DEFAULT '0',
  20. `ccf1` char(64) DEFAULT NULL,
  21. `ccf2` char(64) DEFAULT NULL,
  22. `ecf1` char(64) DEFAULT NULL,
  23. `ecf2` char(64) DEFAULT NULL,
  24. `ims_subscription_data` blob,
  25. PRIMARY KEY (`id`),
  26. UNIQUE KEY `impu` (`impu`)
  27. );
  28. INSERT INTO version (table_name, table_version) values ('impu_contact','6');
  29. CREATE TABLE `impu_contact` (
  30. `id` int(11) NOT NULL AUTO_INCREMENT,
  31. `impu_id` int(11) NOT NULL,
  32. `contact_id` int(11) NOT NULL,
  33. PRIMARY KEY (`id`),
  34. UNIQUE KEY `impu_id` (`impu_id`,`contact_id`)
  35. );
  36. INSERT INTO version (table_name, table_version) values ('subscriber','6');
  37. CREATE TABLE `subscriber` (
  38. `id` int(11) NOT NULL AUTO_INCREMENT,
  39. `watcher_uri` varchar(100) NOT NULL,
  40. `watcher_contact` varchar(100) NOT NULL,
  41. `presentity_uri` varchar(100) NOT NULL,
  42. `event` int(11) NOT NULL,
  43. `expires` datetime NOT NULL,
  44. `version` int(11) NOT NULL,
  45. `local_cseq` int(11) NOT NULL,
  46. `call_id` varchar(50) NOT NULL,
  47. `from_tag` varchar(50) NOT NULL,
  48. `to_tag` varchar(50) NOT NULL,
  49. `record_route` varchar(50) NOT NULL,
  50. `sockinfo_str` varchar(50) NOT NULL,
  51. PRIMARY KEY (`id`),
  52. UNIQUE KEY `watcher_uri` (`event`,`watcher_contact`,`presentity_uri`)
  53. );
  54. INSERT INTO version (table_name, table_version) values ('impu_subscriber','6');
  55. CREATE TABLE `impu_subscriber` (
  56. `id` int(11) NOT NULL AUTO_INCREMENT,
  57. `impu_id` int(11) NOT NULL,
  58. `subscriber_id` int(11) NOT NULL,
  59. PRIMARY KEY (`id`),
  60. UNIQUE KEY `impu_id` (`impu_id`,`subscriber_id`)
  61. );