<div>Hi Adrian,</div><div><br></div><div>Thanks for the quick response.</div><div><br></div><div>Makes sense..</div><div><br></div><div>Database had no meaningful data.</div><div><br></div><div>I ran:</div><div><br></div><div>
mysql cdrtool < create_tables.mysql </div><div>mysql cdrtool < create_data.mysql </div><div><br></div><div>and all is good.</div><div><br></div><div>Interested to know about region and what it is.</div><div><br></div>
<div>Thanks again.</div><div><br></div><div>Regards,</div><div>Brian</div><div><br><br><div class="gmail_quote">On 19 June 2011 19:37, Adrian Georgescu <span dir="ltr"><<a href="mailto:ag@ag-projects.com" target="_blank">ag@ag-projects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">You are missing the incremental database changes between your old version and the current one. You must bring your database schema up to date when upgrading as explained in the changelog, these database changes are documented in setup/mysql/alter_tables.mysql <div>
<br></div><div>The region field is indeed missing from the documentation, I will add it there.</div><div><br></div><div>Adrian</div><div> <br><div><div><div></div><div><div>On Jun 19, 2011, at 7:17 PM, dotnetdub wrote:</div>
<br></div></div><blockquote type="cite"><div><div></div><div><div class="gmail_quote">On 19 June 2011 17:24, dotnetdub <span dir="ltr"><<a href="mailto:dotnetdub@gmail.com" target="_blank">dotnetdub@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi List,<div><br></div><div>CDRTool version 8.12</div><div><br></div><div>I am trying initial import of data.</div><div><br></div><div>I start with the destination table.</div><div><br></div><div>If I copy /var/www/cdrtool/setup/csv/destinations.csv to /var/spool/cdrtool and run importRatingTables.php I get:</div>
<div><br></div><div><div>Database error for query insert into destinations</div><div> (</div><div> reseller_id,</div><div> gateway,</div><div> domain,</div>
<div> subscriber,</div><div> dest_id,</div><div> region,</div><div> dest_name,</div><div> increment,</div><div> min_duration,</div>
<div> max_duration,</div><div> max_price</div><div> ) values (</div><div> '0',</div><div> '',</div><div> '',</div>
<div> '',</div><div> '1',</div><div> 'USA',</div><div> '',</div><div> '0',</div><div>
'0',</div>
<div> '0',</div><div> ''</div><div> ): Unknown column 'region' in 'field list' (1054)</div></div><div><br></div><div><br></div><div>
If I move the region field from it's position to the third column that gets rid of that error but now I get:</div><div><br></div><div><div>Reading file /var/spool/cdrtool/destinations.csv</div><div>Importing destinations from /var/spool/cdrtool/destinations.csv for reseller 0:</div>
<div>Skipped 13127 records</div></div><div><br></div><div>Here are two records and the header from destinations.csv</div><div><br></div><div><table border="0" cellpadding="0" cellspacing="0" width="804" style="border-collapse:collapse;width:804pt">
<col width="26" style="width:26pt">
<col width="46" style="width:46pt">
<col width="70" style="width:70pt">
<col width="41" style="width:41pt">
<col width="45" style="width:45pt">
<col width="59" style="width:59pt">
<col width="73" style="width:73pt">
<col width="266" style="width:266pt">
<col width="26" style="width:26pt">
<col width="47" style="width:47pt">
<col width="49" style="width:49pt">
<col width="56" style="width:56pt">
<tbody><tr height="15" style="min-height:15.0pt">
<td height="15" width="26" style="min-height:15.0pt;width:26pt">Ops</td>
<td width="46" style="width:46pt">Reseller</td>
<td width="70" style="width:70pt">Trusted peer</td>
<td width="41" style="width:41pt">Region</td>
<td width="45" style="width:45pt">Domain</td>
<td width="59" style="width:59pt">Subscriber</td>
<td width="73" style="width:73pt">Destination</td>
<td width="266" style="width:266pt">Description</td>
<td width="26" style="width:26pt">Incr</td>
<td width="47" style="width:47pt">Min Dur</td>
<td width="49" style="width:49pt">Max Dur</td>
<td width="56" style="width:56pt">Max Price</td>
</tr>
<tr height="15" style="min-height:15.0pt">
<td height="15" align="right" style="min-height:15.0pt">2</td>
<td align="right">0</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td align="right">1</td>
<td>USA</td>
<td align="right">0</td>
<td align="right">6</td>
<td align="right">0</td>
<td></td>
</tr>
<tr height="15" style="min-height:15.0pt">
<td height="15" align="right" style="min-height:15.0pt">2</td>
<td align="right">0</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td align="right">1204</td>
<td>CANADA MANITOBA</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="right">0</td>
<td></td>
</tr>
</tbody></table><br>
</div><div><br></div><div>I have been using 6.71 for quite some time with no issue's.</div><div><br></div><div>Any help would be most appreciated, probably missing something very obvious.</div><div><br></div><div>Regards,</div>
<div>Brian</div>
</blockquote></div><br><div><br></div><div><br></div><div>The sample customers,rates work fine.</div><div><br></div><div>I've stripped down a destinations import to:</div><div><br></div><div><div>Ops,Reseller,Trusted peer,Domain,Subscriber,Destination,Description,Incr,Min Dur,Max Dur,Max Price</div>
<div>2,0,,,,1,USA,0,0,0,</div></div><div><br></div><div><br></div><div>When I run it:</div><div><br></div><div><div>Reading file /var/spool/cdrtool/destinations.csv</div><div>Importing destinations from /var/spool/cdrtool/destinations.csv for reseller 0:</div>
<div>Database error for query update destinations set</div><div> region = 'USA',</div><div> dest_name = '0',</div><div> increment = '0',</div>
<div> min_duration = '0',</div><div> max_duration = '0',</div><div> max_price = ''</div><div> where gateway = ''</div>
<div> and reseller_id = '0'</div><div> and domain = ''</div><div> and subscriber = ''</div><div> and dest_id = '1'</div>
<div> : Unknown column 'region' in 'field list' (1054)</div></div><div><br></div><div><br></div><div>There seems to some major inconsistency between the scripts and docs..</div><div><br>
</div><div>Nowhere in any documentation is region mentioned?</div><div><br></div><div>Would appreciate any pointers.</div><div><br></div><div>TIA.</div><div><br></div><div>Brian</div><div><br></div></div></div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br></div>
</div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>