Hello list,

 

We are using SER usr_preferences table for handling a large number of preferences for each user, the problem is that if we use the default form of the MySQL table we would have several (around 10) records for each client (and maybe more as we develop new services). As we have a fixed number of preferences I’d prefer to change the table so it wouldn’t be:

 

CREATE TABLE `usr_preferences` (

  `uuid` varchar(64) NOT NULL default '',

  `username` varchar(100) NOT NULL default '0',

  `domain` varchar(128) NOT NULL default '',

  `attribute` varchar(32) NOT NULL default '',

  `value` varchar(128) NOT NULL default '',

  `type` int(11) NOT NULL default '0',

  `modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

  PRIMARY KEY  (`attribute`,`username`,`domain`)

) ENGINE=ndbcluster DEFAULT CHARSET=latin1 |

 

But instead it would be something like

 

CREATE TABLE `usr_preferences` (

  `uuid` varchar(64) NOT NULL default '',

  `username` varchar(100) NOT NULL default '0',

  `domain` varchar(128) NOT NULL default '',

  `call_forward_on_busy` varchar(32) NOT NULL default '',

  ` call_forward_on_no_available` varchar(32) NOT NULL default '',

  ` call_forward_on_no_available` varchar(32) NOT NULL default '',

  ` call_forward_on_no_response` varchar(32) NOT NULL default '',

  ` language` varchar(32) NOT NULL default '',

  `type` int(11) NOT NULL default '0',

  `modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

  PRIMARY KEY  (`attribute`,`username`,`domain`)

) ENGINE=ndbcluster DEFAULT CHARSET=latin1 |

 

Can this be done, and if so, how can I handle the attribute-value pairs for each different column????

 

Thanks for any help you can provide,

 

Roderick

 

Click here to get your own VIVOphone Account with 30 free minutes to the US and Canada and start calling NOW!!!!