summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/sql/dhcp/postgresql/schema.sql
blob: 0d1727fd96c982ecbda5355361ccd7c30a4c1948 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * $Id$
 *
 * PostgreSQL schema for DHCP for FreeRADIUS
 *
 */

/*
 * Table structure for table 'dhcpgroupreply'
 */
CREATE TABLE IF NOT EXISTS dhcpgroupreply (
	id			serial PRIMARY KEY,
	GroupName		text NOT NULL DEFAULT '',
	Attribute		text NOT NULL DEFAULT '',
	op			VARCHAR(2) NOT NULL DEFAULT '=',
	Value			text NOT NULL DEFAULT '',
	Context			text NOT NULL DEFAULT ''
);
CREATE INDEX dhcpgroupreply_GroupName ON dhcpgroupreply (Context,GroupName,Attribute);

/*
 * Table structure for table 'dhcpreply'
 */
CREATE TABLE IF NOT EXISTS dhcpreply (
	id			serial PRIMARY KEY,
	Identifier		text NOT NULL DEFAULT '',
	Attribute		text NOT NULL DEFAULT '',
	op			VARCHAR(2) NOT NULL DEFAULT '=',
	Value			text NOT NULL DEFAULT '',
	Context			text NOT NULL DEFAULT ''
);
CREATE INDEX dhcpreply_Identifier ON dhcpreply (Context,Identifier,Attribute);

/*
 * Table structure for table 'dhcpgroup'
 */
CREATE TABLE IF NOT EXISTS dhcpgroup (
	id			serial PRIMARY KEY,
	Identifier		text NOT NULL DEFAULT '',
	GroupName		text NOT NULL DEFAULT '',
	Priority		integer NOT NULL DEFAULT 0,
	Context			text NOT NULL DEFAULT ''
);
CREATE INDEX dhcpgroup_Identifier ON dhcpgroup (Context,Identifier);