"Fossies" - the Fresh Open Source Software Archive

Member "freeradius-server-3.0.23/raddb/mods-config/sql/main/sqlite/schema.sql" (10 Jun 2021, 5677 Bytes) of package /linux/misc/freeradius-server-3.0.23.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PL/SQL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "schema.sql": 3.0.22_vs_3.0.23.

    1 -----------------------------------------------------------------------------
    2 -- $Id: 9bdaf71f34013de79504b9bf6e090c8cf0e38979 $                     --
    3 --                                                                         --
    4 --  schema.sql                       rlm_sql - FreeRADIUS SQLite Module    --
    5 --                                                                         --
    6 --     Database schema for SQLite rlm_sql module                           --
    7 --                                                                         --
    8 -----------------------------------------------------------------------------
    9 
   10 --
   11 -- Table structure for table 'radacct'
   12 --
   13 CREATE TABLE IF NOT EXISTS radacct (
   14     radacctid INTEGER PRIMARY KEY AUTOINCREMENT,
   15     acctsessionid varchar(64) NOT NULL default '',
   16     acctuniqueid varchar(32) NOT NULL default '',
   17     username varchar(64) NOT NULL default '',
   18     realm varchar(64) default '',
   19     nasipaddress varchar(15) NOT NULL default '',
   20     nasportid varchar(32) default NULL,
   21     nasporttype varchar(32) default NULL,
   22     acctstarttime datetime NULL default NULL,
   23     acctupdatetime datetime NULL default NULL,
   24     acctstoptime datetime NULL default NULL,
   25     acctinterval int(12) default NULL,
   26     acctsessiontime int(12) default NULL,
   27     acctauthentic varchar(32) default NULL,
   28     connectinfo_start varchar(128) default NULL,
   29     connectinfo_stop varchar(128) default NULL,
   30     acctinputoctets bigint(20) default NULL,
   31     acctoutputoctets bigint(20) default NULL,
   32     calledstationid varchar(50) NOT NULL default '',
   33     callingstationid varchar(50) NOT NULL default '',
   34     acctterminatecause varchar(32) NOT NULL default '',
   35     servicetype varchar(32) default NULL,
   36     framedprotocol varchar(32) default NULL,
   37     framedipaddress varchar(15) NOT NULL default '',
   38     framedipv6address varchar(45) NOT NULL default '',
   39     framedipv6prefix varchar(45) NOT NULL default '',
   40     framedinterfaceid varchar(44) NOT NULL default '',
   41     delegatedipv6prefix varchar(45) NOT NULL default '',
   42     class varchar(64) default NULL
   43 );
   44 
   45 --
   46 --  You might not need all of these indexes.  It should be safe to
   47 --  delete indexes you do not use.  For example, if you're not using
   48 --  IPv6, you can delete the indexes on IPv6 attributes.
   49 --
   50 --  You MUST however leave the indexes needed by the server, which
   51 --  include username, acctstoptime, nasipaddress, acctstarttime, and
   52 --  acctuniqueid.
   53 --
   54 CREATE UNIQUE INDEX acctuniqueid ON radacct(acctuniqueid);
   55 CREATE INDEX username ON radacct(username);
   56 CREATE INDEX framedipaddress ON radacct (framedipaddress);
   57 CREATE INDEX framedipv6address ON radacct (framedipv6address);
   58 CREATE INDEX framedipv6prefix ON radacct (framedipv6prefix);
   59 CREATE INDEX framedinterfaceid ON radacct (framedinterfaceid);
   60 CREATE INDEX delegatedipv6prefix ON radacct (delegatedipv6prefix);
   61 CREATE INDEX acctsessionid ON radacct(acctsessionid);
   62 CREATE INDEX acctsessiontime ON radacct(acctsessiontime);
   63 CREATE INDEX acctstarttime ON radacct(acctstarttime);
   64 CREATE INDEX acctinterval ON radacct(acctinterval);
   65 CREATE INDEX acctstoptime ON radacct(acctstoptime);
   66 CREATE INDEX nasipaddress ON radacct(nasipaddress);
   67 CREATE INDEX class ON radacct(class);
   68 
   69 --
   70 -- Table structure for table 'radcheck'
   71 --
   72 CREATE TABLE IF NOT EXISTS radcheck (
   73     id INTEGER PRIMARY KEY AUTOINCREMENT,
   74     username varchar(64) NOT NULL default '',
   75     attribute varchar(64)  NOT NULL default '',
   76     op char(2) NOT NULL DEFAULT '==',
   77     value varchar(253) NOT NULL default ''
   78 );
   79 CREATE INDEX check_username ON radcheck(username);
   80 
   81 --
   82 -- Table structure for table 'radgroupcheck'
   83 --
   84 CREATE TABLE IF NOT EXISTS radgroupcheck (
   85     id INTEGER PRIMARY KEY AUTOINCREMENT,
   86     groupname varchar(64) NOT NULL default '',
   87     attribute varchar(64)  NOT NULL default '',
   88     op char(2) NOT NULL DEFAULT '==',
   89     value varchar(253)  NOT NULL default ''
   90 );
   91 CREATE INDEX check_groupname ON radgroupcheck(groupname);
   92 
   93 --
   94 -- Table structure for table 'radgroupreply'
   95 --
   96 CREATE TABLE IF NOT EXISTS radgroupreply (
   97     id INTEGER PRIMARY KEY AUTOINCREMENT,
   98     groupname varchar(64) NOT NULL default '',
   99     attribute varchar(64)  NOT NULL default '',
  100     op char(2) NOT NULL DEFAULT '=',
  101     value varchar(253)  NOT NULL default ''
  102 );
  103 CREATE INDEX reply_groupname ON radgroupreply(groupname);
  104 
  105 --
  106 -- Table structure for table 'radreply'
  107 --
  108 CREATE TABLE IF NOT EXISTS radreply (
  109     id INTEGER PRIMARY KEY AUTOINCREMENT,
  110     username varchar(64) NOT NULL default '',
  111     attribute varchar(64) NOT NULL default '',
  112     op char(2) NOT NULL DEFAULT '=',
  113     value varchar(253) NOT NULL default ''
  114 );
  115 CREATE INDEX reply_username ON radreply(username);
  116 
  117 --
  118 -- Table structure for table 'radusergroup'
  119 --
  120 CREATE TABLE IF NOT EXISTS radusergroup (
  121     id INTEGER PRIMARY KEY AUTOINCREMENT,
  122     username varchar(64) NOT NULL default '',
  123     groupname varchar(64) NOT NULL default '',
  124     priority int(11) NOT NULL default '1'
  125 );
  126 CREATE INDEX usergroup_username ON radusergroup(username);
  127 
  128 --
  129 -- Table structure for table 'radpostauth'
  130 --
  131 CREATE TABLE IF NOT EXISTS radpostauth (
  132     id INTEGER PRIMARY KEY AUTOINCREMENT,
  133     username varchar(64) NOT NULL default '',
  134     pass varchar(64) NOT NULL default '',
  135     reply varchar(32) NOT NULL default '',
  136     authdate timestamp NOT NULL,
  137     class varchar(64) default NULL
  138 );
  139 CREATE INDEX radpostauth_username ON radpostauth(username);
  140 CREATE INDEX radpostauth_class ON radpostauth(class);
  141 
  142 --
  143 -- Table structure for table 'nas'
  144 --
  145 CREATE TABLE IF NOT EXISTS nas (
  146     id INTEGER PRIMARY KEY AUTOINCREMENT,
  147     nasname varchar(128) NOT NULL,
  148     shortname varchar(32),
  149     type varchar(30) DEFAULT 'other',
  150     ports int(5),
  151     secret varchar(60) DEFAULT 'secret' NOT NULL,
  152     server varchar(64),
  153     community varchar(50),
  154     description varchar(200) DEFAULT 'RADIUS Client'
  155 );
  156 CREATE INDEX nasname ON nas(nasname);