<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">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
cite="mid:CAOoW2haH7w1UZJv6s1EaoET8=WNNxsL744-8=ijockaTqTqkyg@mail.gmail.com"
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
moz-do-not-send="true" 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
moz-do-not-send="true" 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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a class="moz-txt-link-freetext" href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ron Wheeler
President
Artifact Software Inc
email: <a class="moz-txt-link-abbreviated" href="mailto:rwheeler@artifact-software.com">rwheeler@artifact-software.com</a>
skype: ronaldmwheeler
phone: 866-970-2435, ext 102</pre>
</body>
</html>