caminte
caminte copied to clipboard
User defined primary keys in sqlite3 table
I am creating a cloud application. The application involves maintaining a database and so i have designed a table with the following schema :
create table connectioninfo ( device_id integer primary key, date_updated integer not null, unique(device_id) );
The database used is sqlite3 and I am using caminte for performing database related operations. When I am trying to insert or update a record in the table, I am getting the following error :
{ [Error: SQLITE_ERROR: table connectioninfo has no column named id] errno: 1, code: 'SQLITE_ERROR' }
I don't have any field with name 'id' . Is it necessary to have a field with the name 'id' in each table ? Can't I have user defined auto increment primary keys ? If so, how ?
I am pretty sure caminte creates an id column for you.
You might need to migrate your schema.
I confirm Caminte creates an id column automatically
i am having the same problem on postgresql. I can not save the object because i dont have an id column. Nothing is being done automatically.