Rymapt / ethoscope

a platform from monitoring animal behaviour in real time from a raspberry pi
http://gilestrolab.github.io/ethoscope/
GNU General Public License v3.0
0 stars 2 forks source link

Fix for SQLite row ID #63

Closed mark-grimes closed 6 years ago

mark-grimes commented 6 years ago

Currently, if you run tracking off line and save to an SQLite file the row ID in the database is not set. It turns out SQLite has some idiosyncrasies when specifying the primary key in order to get the auto incrementing required behaviour.

This PR turns

"id INT AUTO_INCREMENT PRIMARY KEY"

into

"id INTEGER PRIMARY KEY AUTOINCREMENT"

if the output is to SQLite.