> -----Original Message----- > From: Matthew Crocker [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 22, 2006 10:03 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Realtime Extensions -- Comments? > > > Add a boolean field to the table then create a view based on the > value of that field > > >>> CREATE TABLE `extensions_table_data` ( > >>> `id` int(11) NOT NULL auto_increment, > 'isActive' boolean NOT NULL default 'True', > >>> `context` varchar(20) NOT NULL default '', > >>> `exten` varchar(20) NOT NULL default '', > >>> `priority` tinyint(4) NOT NULL default '0', > >>> `app` varchar(20) NOT NULL default '', > >>> `appdata` varchar(128) NOT NULL default '', > >>> PRIMARY KEY (`context`,`exten`,`priority`), > >>> KEY `id` (`id`) > >>> ) TYPE=MyISAM; > >>> > >>> Uhm... what abouts comments? What if I wanted to temporarily > >>> deactivate a couple of extensions? Without a comment flag, > >> I'd have > >>> to completely remove those entries from the extensions table! > >>> That's not very friendly is it... Is there a better way? > > Then > > Create view extensions_table as SELECT > id,context,exten,priority,app,appdata from extensions_table_data > where IsActive = True; > > Then you can just flip the IsActive bit on/off to remove extensions
That's the workaround I've implemented. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
