[asterisk-users] CDR - Freepbx - Safe to add primary key to table ?
Olivier
oza_4h07 at yahoo.fr
Thu Dec 6 11:58:30 CST 2012
2012/12/6 Leandro Dardini <ldardini at gmail.com>
> Yes, go for it. However I have added another autoincrement column and
> created the primary key on it.
May I ask why did you choose to add a new column ?
I'm hesitating between both solutions.
For me, your solution has the advantage that, if, for any reason, a
uniqueid is missing, it would still work ok.
> On the other columns I need to search I have created just an index.
>
> Leandro
>
> 2012/12/6 Olivier <oza_4h07 at yahoo.fr>
>
>> Hello,
>>
>> I need to develop an application that will query (mostly reading) an
>> existing MySQL CDR database.
>> This database (named asteriskcdrdb) was created during Freepbx 2.10
>> install on my asterisk 1.8 setup.
>> This database has a single CDR table which is filled by Asterisk.
>>
>> The tools I'm planning to use require this table to include a Primary Key.
>> Is it safe to Alter this table telling it to use UniqueID column as a
>> Primary Key ?
>>
>> (Sure, I'll test this on a database copy but I'm not confident my tests
>> will cover everything)
>>
>> Regards
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>> http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121206/3d28ff04/attachment.htm>
More information about the asterisk-users
mailing list