<p>The reason I add a new column autoincrement is due to the fact I trust more mysql about uniquness than asterisk. </p>
<p>Leandro</p>
<p>I am typing from my mobile phone...</p>
<div class="gmail_quote">Il giorno 06/dic/2012 19:11, "Ron Wheeler" <<a href="mailto:rwheeler@artifact-software.com">rwheeler@artifact-software.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>It seems like a safe thing to do.<br>
You could also ask about the impact of making an existing column
a primary key, in a MySQL forum.<br>
<br>
Leandro's solution seems to be a good one as well and does
guarantee uniqueness.<br>
<br>
<br>
<br>
Ron<br>
<br>
On 06/12/2012 12:25 PM, Leandro Dardini wrote:<br>
</div>
<blockquote type="cite">Yes, go for it. However I have added another
autoincrement column and created the primary key on it. On the
other columns I need to search I have created just an index.
<div><br>
</div>
<div>Leandro<br>
<br>
<div class="gmail_quote">
2012/12/6 Olivier <span dir="ltr"><<a href="mailto:oza_4h07@yahoo.fr" target="_blank">oza_4h07@yahoo.fr</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I need to develop an application that will query (mostly
reading) an existing MySQL CDR database.<br>
This database (named asteriskcdrdb) was created during
Freepbx 2.10 install on my asterisk 1.8 setup.<br>
This database has a single CDR table which is filled by
Asterisk.<br>
<br>
The tools I'm planning to use require this table to include
a Primary Key.<br>
Is it safe to Alter this table telling it to use UniqueID
column as a Primary Key ?<br>
<br>
(Sure, I'll test this on a database copy but I'm not
confident my tests will cover everything)<br>
<br>
Regards<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar
every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Ron Wheeler
President
Artifact Software Inc
email: <a href="mailto:rwheeler@artifact-software.com" target="_blank">rwheeler@artifact-software.com</a>
skype: ronaldmwheeler
phone: <a href="tel:866-970-2435%2C%20ext%20102" value="+18669702435" target="_blank">866-970-2435, ext 102</a></pre>
</div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div>