Prophidys / RTG2

Realtime Traffic Grapher 2
GNU General Public License v2.0
11 stars 9 forks source link

Mismatch in default table indices using createdb #40

Closed Prophidys closed 9 years ago

Prophidys commented 9 years ago

From justin.z...@gmail.com on June 27, 2013 10:38:25

There is some strangeness in the stock createdb script:

1) The primary key (rid) in router is unsigned, but in interface it is stored as a signed integer. 2) The primary key (id) in interface is unsigned, but in other tables it is stored as a signed integer. 3) counter and rate in any of the stock tables should really never be signed.

Realistically, the developers of rtg recommend modifying the DB to fit your environment. However for those of you who want to start from a clean slate with createdb, I'm attaching a patch to implement these changes.

Also have a look at https://code.google.com/p/rtg2/issues/detail?id=41 for a createdb patch that may speed up your frontend queries.

Attachment: createdb.in.patch

Original issue: http://code.google.com/p/rtg2/issues/detail?id=43

Prophidys commented 9 years ago

Fixed here : https://github.com/Prophidys/RTG2/commit/d473a82b066bce74d7919b14f50b34dcbfb8f9a0

Thank you for your contribution.

Cédric.