From af754e596a8dbb05ed8580c342e7fe02e08b28e0 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Sat, 13 Apr 2024 16:11:00 +0200
Subject: Adding upstream version 3.2.3+dfsg.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 .../mods-config/sql/ippool-dhcp/oracle/schema.sql  | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 raddb/mods-config/sql/ippool-dhcp/oracle/schema.sql

(limited to 'raddb/mods-config/sql/ippool-dhcp/oracle/schema.sql')

diff --git a/raddb/mods-config/sql/ippool-dhcp/oracle/schema.sql b/raddb/mods-config/sql/ippool-dhcp/oracle/schema.sql
new file mode 100644
index 0000000..32d28bb
--- /dev/null
+++ b/raddb/mods-config/sql/ippool-dhcp/oracle/schema.sql
@@ -0,0 +1,28 @@
+CREATE TABLE dhcpstatus (
+	status_id		INT PRIMARY KEY,
+	status			VARCHAR(10) NOT NULL
+);
+
+INSERT INTO dhcpstatus (status_id, status) VALUES (1, 'dynamic');
+INSERT INTO dhcpstatus (status_id, status) VALUES (2, 'static');
+INSERT INTO dhcpstatus (status_id, status) VALUES (3, 'declined');
+INSERT INTO dhcpstatus (status_id, status) VALUES (4, 'disabled');
+
+CREATE SEQUENCE dhcpippool_seq START WITH 1 INCREMENT BY 1;
+
+CREATE TABLE dhcpippool (
+	id			INT DEFAULT ON NULL dhcpippool_seq.NEXTVAL PRIMARY KEY,
+	pool_name		VARCHAR(30) NOT NULL,
+	framedipaddress		VARCHAR(15) NOT NULL,
+	pool_key		VARCHAR(30) DEFAULT '',
+	gateway			VARCHAR(15) DEFAULT '',
+	expiry_time		timestamp(0) DEFAULT CURRENT_TIMESTAMP,
+	status_id		INT DEFAULT 1,
+	counter			INT DEFAULT 0,
+	FOREIGN KEY (status_id) REFERENCES dhcpstatus(status_id)
+);
+
+CREATE INDEX dhcpippool_poolname_expire ON dhcpippool (pool_name, expiry_time);
+CREATE INDEX dhcpippool_framedipaddress ON dhcpippool (framedipaddress);
+CREATE INDEX dhcpippool_poolname_poolkey_ipaddress ON dhcpippool (pool_name, pool_key, framedipaddress);
+
-- 
cgit v1.2.3

