CREATE TABLE radcheck (
  id Serial,
  UserName char(64),
  Attribute char(32),
  op char(2),
  Value char(253),
  primary key  (id)
) ;
  create index UserName on radcheck (UserName ASC)


CREATE TABLE radgroupcheck (
  id Serial,
  GroupName char(64),
  Attribute char(32),
  op char(2),
  Value char(253),
  primary key  (id)
};
  create index GroupName on radgroupcheck (GroupName ASC)


CREATE TABLE radgroupreply (
  id Serial,
  GroupName char(64),
  Attribute char(32),
  op char(2),
  Value char(253),
  prio integer,
  primary key  (id)
) ;
  create index GroupName on radgroupcheck (GroupName ASC)

CREATE TABLE radreply (
  id Serial,
  UserName char(64),
  Attribute char(32),
  op char(2),
  Value char(253),
  primary key  (id)
) ;
create index UserName on radcheck (UserName ASC)

CREATE TABLE usergroup (
  id Serial,
  UserName char(64),
  GroupName char(64),
  primary key  (id)
);
create index UserName on radcheck (UserName ASC)

CREATE TABLE radpostauth (
  id Serial,
  user char(64),
  pass char(64),
  reply char(32),
  date date,
  primary key  (id)
) ;

CREATE TABLE radacct (
  RadAcctId serial,
  AcctSessionId char(32),
  AcctUniqueId char(32),
  UserName char(64),
  Realm char(64),
  NASIPAddress char(15),
  NASPortId integer,
  NASPortType char(32),
  AcctStartTime datetime hour to second,
  AcctStopTime datetime hour to second,
  AcctSessionTime integer,
  AcctAuthentic char(32),
  ConnectInfo_start char(32),
  ConnectInfo_stop char(32),
  AcctInputOctets integer,
  AcctOutputOctets integer,
  CalledStationId char(50),
  CallingStationId char(50),
  AcctTerminateCause char(32),
  ServiceType char(32),
  FramedProtocol char(32),
  FramedIPAddress char(15),
  AcctStartDelay integer,
  AcctStopDelay integer,
  PRIMARY KEY  (RadAcctId)
) ;
  create index UserName on radacct (UserName ASC),
  create index FramedIPAddress on radacct (FramedIPAddress ASC),
  create index AcctSessionId on radacct (AcctSessionId ASC),
  create index AcctUniqueId on radacct (AcctUniqueId ASC),
  create index AcctStartTime on radacct (AcctStartTime ASC),
  create index AcctStopTime on radacct (AcctStopTime ASC),
  create index NASIPAddress on radacct (NASIPAddress ASC)

