Add postgresql specific sql schema by apellido jr., wilfredo p. Move each sql schema...
authorkkalev <kkalev>
Tue, 22 Jun 2004 14:01:22 +0000 (14:01 +0000)
committerkkalev <kkalev>
Tue, 22 Jun 2004 14:01:22 +0000 (14:01 +0000)
separate directory (mysql and postgresql)

dialup_admin/Changelog
dialup_admin/sql/mysql/badusers.sql [moved from dialup_admin/sql/badusers.sql with 100% similarity]
dialup_admin/sql/mysql/mtotacct.sql [moved from dialup_admin/sql/mtotacct.sql with 100% similarity]
dialup_admin/sql/mysql/totacct.sql [moved from dialup_admin/sql/totacct.sql with 100% similarity]
dialup_admin/sql/mysql/userinfo.sql [moved from dialup_admin/sql/userinfo.sql with 100% similarity]
dialup_admin/sql/postgresql/badusers.sql [new file with mode: 0644]
dialup_admin/sql/postgresql/mtotacct.sql [new file with mode: 0644]
dialup_admin/sql/postgresql/totacct.sql [new file with mode: 0644]
dialup_admin/sql/postgresql/userinfo.sql [new file with mode: 0644]

index 32d2db1..d4d0cd4 100644 (file)
@@ -7,6 +7,8 @@ Ver 1.72:
   only be able to administer those access servers and not see the rest of the nas list.
 * Add username searching in the find page as suggested by joram agten
 * Don't use nas_list in nas_admin
+* Add postgresql specific sql schema by apellido jr., wilfredo p. Move each sql schema to a
+  separate directory (mysql and postgresql)
 Ver 1.70:
 * Add the /bin postgresql compatibility patch from Guy Fraser
 * Add ldap_userdn as a configuration directive. If set we use that for
diff --git a/dialup_admin/sql/postgresql/badusers.sql b/dialup_admin/sql/postgresql/badusers.sql
new file mode 100644 (file)
index 0000000..7312704
--- /dev/null
@@ -0,0 +1,13 @@
+SET search_path = public, pg_catalog;
+
+--Table structure for table 'badusers'
+--
+CREATE TABLE badusers (
+    id BIGSERIAL PRIMARY KEY,
+    username TEXT NOT NULL,
+    date timestamp with time zone DEFAULT 'now' NOT NULL,
+    reason TEXT,
+    admin TEXT DEFAULT '-'
+);
+CREATE INDEX badusers_actiondate_idx ON badusers USING btree (actiondate);
+CREATE INDEX badusers_username_idx ON badusers USING btree (username);
diff --git a/dialup_admin/sql/postgresql/mtotacct.sql b/dialup_admin/sql/postgresql/mtotacct.sql
new file mode 100644 (file)
index 0000000..f8502e1
--- /dev/null
@@ -0,0 +1,23 @@
+SET search_path = public, pg_catalog;
+
+--
+-- Table structure for table 'mtotacct'
+--
+CREATE TABLE mtotacct (
+    mtotacctid BIGSERIAL PRIMARY KEY,
+    username TEXT DEFAULT '' NOT NULL,
+    acctdate DATE DEFAULT 'now' NOT NULL,
+    connnum BIGINT,
+    conntotduration BIGINT,
+    connmaxduration BIGINT,
+    connminduration BIGINT,
+    inputoctets BIGINT,
+    outputoctets BIGINT,
+    nasipaddress INET
+);
+CREATE INDEX mtotacct_acctdate_idx ON mtotacct USING btree (acctdate);
+CREATE INDEX mtotacct_nasipaddress_idx ON mtotacct USING btree
+(nasipaddress);
+CREATE INDEX mtotacct_username_idx ON mtotacct USING btree (username);
+CREATE INDEX mtotacct_userondate_idx ON mtotacct USING btree (username,
+acctdate);
diff --git a/dialup_admin/sql/postgresql/totacct.sql b/dialup_admin/sql/postgresql/totacct.sql
new file mode 100644 (file)
index 0000000..373aae4
--- /dev/null
@@ -0,0 +1,24 @@
+SET search_path = public, pg_catalog;
+
+--
+-- Table structure for table 'totacct'
+--
+CREATE TABLE totacct (
+    totacctid bigSERIAL PRIMARY KEY,
+    username TEXT DEFAULT '' NOT NULL,
+    acctdate DATE DEFAULT 'now' NOT NULL,
+    connnum BIGINT,
+    conntotduration BIGINT,
+    connmaxduration BIGINT,
+    connminduration BIGINT,
+    inputoctets BIGINT,
+    outputoctets BIGINT,
+    nasipaddress INET
+);
+CREATE INDEX totacct_acctdate_idx ON totacct USING btree (acctdate);
+CREATE INDEX totacct_nasipaddress_idx ON totacct USING btree (nasipaddress);
+CREATE INDEX totacct_nasondate_idx ON totacct USING btree (acctdate,
+nasipaddress);
+CREATE INDEX totacct_username_idx ON totacct USING btree (username);
+CREATE INDEX totacct_userondate_idx ON totacct USING btree (username,
+acctdate);
diff --git a/dialup_admin/sql/postgresql/userinfo.sql b/dialup_admin/sql/postgresql/userinfo.sql
new file mode 100644 (file)
index 0000000..644bc95
--- /dev/null
@@ -0,0 +1,19 @@
+SET search_path = public, pg_catalog;
+
+--
+-- Table structure for table 'userinfo'
+--
+CREATE TABLE userinfo (
+    id SERIAL PRIMARY KEY,
+    username TEXT,
+    name TEXT,
+    mail TEXT,
+    department TEXT,
+    workphone TEXT,
+    homephone TEXT,
+    mobile TEXT
+);
+CREATE INDEX userinfo_department_idx ON userinfo USING btree (department);
+CREATE INDEX userinfo_username_idx ON userinfo USING btree (username);
+
+