Adding DnsGuard sample App
[toolkit.git] / samples / dnsguard / src / main / resources / database.sql
1 CREATE TABLE bulkreply (
2                   idbulkreply int(11) NOT NULL AUTO_INCREMENT,
3                   request varchar(255) DEFAULT NULL,
4                   type int(11) DEFAULT NULL,
5                   ttl int(11) DEFAULT NULL,
6                   len int(11) DEFAULT NULL,
7                   data varchar(255) DEFAULT NULL,
8                   ip_src varchar(16) DEFAULT NULL,
9                   ip_dst varchar(16) DEFAULT NULL,
10                   udp_src int(11) DEFAULT NULL,
11                   udp_dst int(11) DEFAULT NULL,
12                   tstamp timestamp NULL DEFAULT NULL,
13                   PRIMARY KEY (idbulkreply)
14 ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
15
16 CREATE TABLE config (
17   idconfig int(11) NOT NULL AUTO_INCREMENT,
18   configname varchar(16) DEFAULT NULL,
19   configval varchar(16) DEFAULT NULL,
20   PRIMARY KEY (idconfig)
21 ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
22
23
24 INSERT INTO config (configname, configval)
25 SELECT 'localdns', '192.168.0.1'
26   FROM dual
27   WHERE NOT EXISTS (SELECT 1 
28                      FROM config 
29                      WHERE configname = 'localdns');