blob: 3d0a3626d25b9a61753e1b2ed0063b41eff92a60 [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001#########################################################################
2# diameap.sql #
3# DiamEAP extension #
4# Users Information Database schema #
5# #
6# #
7# #
8# MySQL command to load the script: #
9# mysql> mysql -u username -p password diameap_ui < diameap.sql #
10# #
11#########################################################################
12
13-- --------------------------------------------------------
14
15--
16-- Table structure for table `authe`
17--
18
19CREATE TABLE IF NOT EXISTS `authe` (
20 `id` int(11) NOT NULL AUTO_INCREMENT,
21 `grp` int(11) NOT NULL,
22 `attribute` set('Authorization-Lifetime','Auth-Grace-Period','Auth-Session-State','Re-Auth-Request-Type','Session-Timeout','Multi-Round-Time-Out','Acct-Interim-Interval') NOT NULL DEFAULT 'Authorization-Lifetime',
23 `value` char(255) NOT NULL,
24 PRIMARY KEY (`id`)
25);
26
27-- --------------------------------------------------------
28
29--
30-- Table structure for table `authz`
31--
32
33CREATE TABLE IF NOT EXISTS `authz` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `grp` int(11) NOT NULL,
36 `attribute` set('NAS-IPv6-Address','NAS-Identifier','NAS-IP-Address','NAS-Port','NAS-Port-Id','NAS-Port-Type','Called-Station-Id','Calling-Station-Id','Connect-Info','Originating-Line-Info','Service-Type','Callback-Number','Callback-Id','Idle-Timeout','Port-Limit','NAS-Filter-Rule','Filter-Id','Configuration-Token','QoS-Filter-Rule','Framed-Protocol','Framed-Routing','Framed-MTU','Framed-Compression','Framed-IP-Address','Framed-IP-Netmask','Framed-Route','Framed-Pool','Framed-Interface-Id','Framed-IPv6-Prefix','Framed-IPv6-Pool','Framed-IPv6-Route','Framed-IPX-Network','Framed-Appletalk-Link','Framed-Appletalk-Network','Framed-Appletalk-Zone') NOT NULL DEFAULT 'Service-Type',
37 `op` set('==','>','>=','<','<=','!=','~=','=+','+==','+>','+>=','+<','+<=','+!=','+~=','==+','>+','>=+','<+','<=+','!=+') NOT NULL DEFAULT '==',
38 `value` char(255) NOT NULL,
39 PRIMARY KEY (`id`)
40);
41
42-- --------------------------------------------------------
43
44--
45-- Table structure for table `grp`
46--
47
48CREATE TABLE IF NOT EXISTS `grp` (
49 `id` int(11) NOT NULL AUTO_INCREMENT,
50 `grp_name` char(255) NOT NULL,
51 `active` set('Y','N') NOT NULL DEFAULT 'Y',
52 PRIMARY KEY (`id`)
53);
54
55-- --------------------------------------------------------
56
57--
58-- Table structure for table `users`
59--
60
61CREATE TABLE IF NOT EXISTS `users` (
62 `id` int(11) NOT NULL AUTO_INCREMENT,
63 `username` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
64 `eapmethod` tinyint(3) unsigned NOT NULL DEFAULT '0',
65 `vendor` int(11) NOT NULL DEFAULT '0',
66 `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
67 `active` enum('Y','N') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'Y',
68 PRIMARY KEY (`id`)
69);
70
71-- --------------------------------------------------------
72
73--
74-- Table structure for table `user_grp`
75--
76
77CREATE TABLE IF NOT EXISTS `user_grp` (
78 `id` int(11) NOT NULL AUTO_INCREMENT,
79 `user` int(11) NOT NULL,
80 `grp` int(11) NOT NULL,
81 PRIMARY KEY (`id`)
82);