Rename table for consistency
authorpnixon <pnixon>
Fri, 22 Sep 2006 12:26:20 +0000 (12:26 +0000)
committerpnixon <pnixon>
Fri, 22 Sep 2006 12:26:20 +0000 (12:26 +0000)
doc/examples/mssql.sql
doc/examples/mysql.sql
doc/examples/oracle.sql
doc/examples/postgresql.sql
doc/examples/postgresql_update_radacct_group_trigger.sql
raddb/sql.conf

index 21f8934..6273410 100644 (file)
@@ -84,8 +84,8 @@ CREATE TABLE [radreply] (
 ) ON [PRIMARY]
 GO
 
-/****** Object:  Table [usergroup]    Script Date: 26.03.02 16:55:18 ******/
-CREATE TABLE [usergroup] (
+/****** Object:  Table [radusergroup]    Script Date: 26.03.02 16:55:18 ******/
+CREATE TABLE [radusergroup] (
        [id] [int] IDENTITY (1, 1) NOT NULL ,
        [UserName] [varchar] (64) NOT NULL ,
        [GroupName] [varchar] (64) NULL
@@ -167,10 +167,10 @@ ALTER TABLE [radreply] WITH NOCHECK ADD
        )  ON [PRIMARY]
 GO
 
-ALTER TABLE [usergroup] WITH NOCHECK ADD
-       CONSTRAINT [DF_usergroup_UserName] DEFAULT ('') FOR [UserName],
-       CONSTRAINT [DF_usergroup_GroupName] DEFAULT ('') FOR [GroupName],
-       CONSTRAINT [PK_usergroup] PRIMARY KEY  NONCLUSTERED
+ALTER TABLE [radusergroup] WITH NOCHECK ADD
+       CONSTRAINT [DF_radusergroup_UserName] DEFAULT ('') FOR [UserName],
+       CONSTRAINT [DF_radusergroup_GroupName] DEFAULT ('') FOR [GroupName],
+       CONSTRAINT [PK_radusergroup] PRIMARY KEY  NONCLUSTERED
        (
                [id]
        )  ON [PRIMARY]
@@ -209,5 +209,5 @@ GO
  CREATE  INDEX [UserName] ON [radreply]([UserName]) ON [PRIMARY]
 GO
 
- CREATE  INDEX [UserName] ON [usergroup]([UserName]) ON [PRIMARY]
+ CREATE  INDEX [UserName] ON [radusergroup]([UserName]) ON [PRIMARY]
 GO
index 50829d4..d798e85 100644 (file)
@@ -108,10 +108,10 @@ CREATE TABLE radreply (
 
 
 #
-# Table structure for table 'usergroup'
+# Table structure for table 'radusergroup'
 #
 
-CREATE TABLE usergroup (
+CREATE TABLE radusergroup (
   UserName varchar(64) NOT NULL default '',
   GroupName varchar(64) NOT NULL default '',
   priority int(11) NOT NULL default '1',
index 911cda5..e2baf1d 100644 (file)
@@ -155,22 +155,22 @@ CREATE OR REPLACE TRIGGER radreply_serialnumber
 /
 
 /*
- * Table structure for table 'usergroup'
+ * Table structure for table 'radusergroup'
  */
-CREATE TABLE usergroup (
+CREATE TABLE radusergroup (
        id              INT PRIMARY KEY,
        UserName        VARCHAR(30) UNIQUE NOT NULL,
        GroupName       VARCHAR(30)
 );
-CREATE SEQUENCE usergroup_seq START WITH 1 INCREMENT BY 1;
+CREATE SEQUENCE radusergroup_seq START WITH 1 INCREMENT BY 1;
 
 /* Trigger to emulate a serial # on the primary key */
-CREATE OR REPLACE TRIGGER usergroup_serialnumber
-       BEFORE INSERT OR UPDATE OF id ON usergroup
+CREATE OR REPLACE TRIGGER radusergroup_serialnumber
+       BEFORE INSERT OR UPDATE OF id ON radusergroup
        FOR EACH ROW
        BEGIN
                if ( :new.id = 0 or :new.id is null ) then
-                       SELECT usergroup_seq.nextval into :new.id from dual;
+                       SELECT radusergroup_seq.nextval into :new.id from dual;
                end if;
        END;
 /
index 6274ed1..fa22525 100644 (file)
@@ -128,18 +128,18 @@ create index radreply_UserName on radreply (UserName,Attribute);
 -- create index radreply_UserName_lower on radreply (lower(UserName),Attribute);
 
 /*
- * Table structure for table 'usergroup'
+ * Table structure for table 'radusergroup'
  */
-CREATE TABLE usergroup (
+CREATE TABLE radusergroup (
        UserName        VARCHAR(64) NOT NULL DEFAULT '',
        GroupName       VARCHAR(64) NOT NULL DEFAULT '',
        priority        INTEGER NOT NULL DEFAULT 0
 );
-create index usergroup_UserName on usergroup (UserName);
+create index radusergroup_UserName on radusergroup (UserName);
 /*
  * Use this index if you use case insensitive queries
  */
--- create index usergroup_UserName_lower on usergroup (lower(UserName));
+-- create index radusergroup_UserName_lower on radusergroup (lower(UserName));
 
 /*
  * Table structure for table 'realmgroup'
index 0655ea6..b2f6967 100644 (file)
@@ -4,7 +4,7 @@
  * OPTIONAL Postgresql trigger for FreeRADIUS
  *
  * This trigger updates fills in the groupname field (which doesnt come in Accounting packets)
- * by querying the usergroup table.
+ * by querying the radusergroup table.
  * This makes it easier to do group summary reports, however note that it does add some extra
  * database load to 50% of your SQL accounting queries. If you dont care about group summary 
  * reports then you dont need to install this.
@@ -18,7 +18,7 @@ DECLARE
         v_groupname varchar;
 
 BEGIN
-        SELECT INTO v_groupname groupname FROM usergroup WHERE calledstationid = NEW.calledstationid AND username = NEW.username;
+        SELECT INTO v_groupname groupname FROM radusergroup WHERE calledstationid = NEW.calledstationid AND username = NEW.username;
         IF FOUND THEN
                 UPDATE radacct SET groupname = v_groupname WHERE radacctid = NEW.radacctid;
         END IF;
index 2cea4b4..f2069fd 100644 (file)
@@ -42,7 +42,7 @@ sql {
        groupreply_table = "radgroupreply"
 
        # Table to keep group info
-       usergroup_table = "usergroup"
+       usergroup_table = "radusergroup"
 
        # If set to 'yes' (default) we read the group tables
        # If set to 'no' the user MUST have Fall-Through = Yes in the radreply table