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.
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 ininterface
it is stored as a signed integer. 2) The primary key (id) ininterface
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