]> git.defcon.no Git - hermes/blob - doc/sql-data/structure-kamailio.sql
First stab at a naive permissions-tool
[hermes] / doc / sql-data / structure-kamailio.sql
1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
2 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
3 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
4 /*!40101 SET NAMES utf8 */;
5 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
6 /*!40103 SET TIME_ZONE='+00:00' */;
7 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
8 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
9 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
10 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
11
12 SET @saved_cs_client = @@character_set_client;
13 SET character_set_client = utf8;
14
15 --
16 -- Table structure for table `dbaliases`
17 --
18
19 CREATE TABLE `dbaliases` (
20 `id` int(10) unsigned NOT NULL auto_increment,
21 `alias_username` varchar(64) NOT NULL default '',
22 `alias_domain` varchar(64) NOT NULL default '',
23 `username` varchar(64) NOT NULL default '',
24 `domain` varchar(64) NOT NULL default '',
25 PRIMARY KEY (`id`),
26 UNIQUE KEY `alias_idx` (`alias_username`,`alias_domain`),
27 KEY `target_idx` (`username`,`domain`)
28 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
29
30 --
31 -- Table structure for table `domain`
32 --
33
34 CREATE TABLE `domain` (
35 `id` int(10) unsigned NOT NULL auto_increment,
36 `domain` varchar(64) NOT NULL default '',
37 `last_modified` datetime NOT NULL default '1900-01-01 00:00:01',
38 PRIMARY KEY (`id`),
39 UNIQUE KEY `domain_idx` (`domain`)
40 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
41
42 --
43 -- Table structure for table `subscriber`
44 --
45
46 CREATE TABLE `subscriber` (
47 `id` int(10) unsigned NOT NULL auto_increment,
48 `username` varchar(64) NOT NULL default '',
49 `domain` varchar(64) NOT NULL default '',
50 `password` varchar(25) NOT NULL default '',
51 `email_address` varchar(64) NOT NULL default '',
52 `ha1` varchar(64) NOT NULL default '',
53 `ha1b` varchar(64) NOT NULL default '',
54 `rpid` varchar(64) default NULL,
55 `permitedcalls` smallint(6) default '14',
56 `permittedcalls` smallint(6) default '14',
57 PRIMARY KEY (`id`),
58 UNIQUE KEY `account_idx` (`username`,`domain`),
59 KEY `username_idx` (`username`)
60 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
61
62 --
63 -- Table structure for table `version`
64 --
65
66 CREATE TABLE `version` (
67 `table_name` varchar(32) NOT NULL,
68 `table_version` int(10) unsigned NOT NULL default '0'
69 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
70
71 SET character_set_client = @saved_cs_client;
72
73 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
74
75 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
76 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
77 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
78 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
79 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
80 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
81 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;