Hi there,
I'm using SQLITE version 3.16.0 on macOS Sierra 10.12.4. I'm experiencing a
unique bug where if I put in an primary key constraint with underscores
then the primary key does not auto increment when I insert values.
*For example:*
CREATE TABLE sensor_status(status_id INTEGER *PRIMARY_KEY*, status text
NOT_NULL UNIQUE);
insert into sensor_status(status) VALUES("ONLINE");
select * from sensor_status;
status_id status
---------- ----------
ONLINE
*Versus:*
CREATE TABLE sensor_status(status_id INTEGER *PRIMARY KEY*, status text
NOT_NULL UNIQUE);
insert into sensor_status(status) VALUES("ONLINE");
select * from sensor_status;
status_id status
---------- ----------
1 ONLINE
I'm not sure what the implications of this are on other constraints such as
NOT_NULL which also does not seem to work with the underscore notation.
EDIT: I've just realised that there is no check in place for whether the
constraint is typed correctly.
I'm not sure now if this is necessarily a bug or a feature that hasn't been
implemented (intentionally or unintentionally). I'm new to sqlite so I
apologise if I'm wasting anyone's time by reporting this :(
Thanks,
Aflah
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users