You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create table generate table that cannot be modified #877
Using this sql:
CREATE TABLE CONTACT (ID integer PRIMARY KEY AUTOINCREMENT,NAME varchar NOT NULL,PHONE varchar,ADDRESS varchar,NOTE text,EMERGENCY boolean NOT NULL DEFAULT NO,USERID integer NOT NULL DEFAULT 0, EMAIL varchar) create the table, but cannot modify on edit the table!
Its the default values which has thrown it out. I created the SQL, but when I went to modify the table, DB4S thought it was empty. Remove the 'default' option, and it works OK.
Referencing #741 as its an issue with the parser...
Thanks for reporting this, @FreudGit! You've stumbled upon a nice corner case there. This happens when using an unquoted default value that's a keyword at the same time. In your case that's the DEFAULT NO part of the EMERGENCY column. I think this should be fixed by the latest commit. Can you try tomorrow's nightly build to check if it's working for you as well? 😃
Activity
chrisjlocke commentedon Nov 22, 2016
Its the default values which has thrown it out. I created the SQL, but when I went to modify the table, DB4S thought it was empty. Remove the 'default' option, and it works OK.
Referencing #741 as its an issue with the parser...
FreudGit commentedon Nov 22, 2016
Thanks.
Also, if I go to the editor, I cannot add a new row.
chrisjlocke commentedon Nov 22, 2016
Can you give steps you're doing so I can try to replicate this...
grammar: Fix using unquoted keywords as DEFAULT values in constraints
MKleusberg commentedon Jan 14, 2017
Thanks for reporting this, @FreudGit! You've stumbled upon a nice corner case there. This happens when using an unquoted default value that's a keyword at the same time. In your case that's the
DEFAULT NOpart of theEMERGENCYcolumn. I think this should be fixed by the latest commit. Can you try tomorrow's nightly build to check if it's working for you as well? 😃grammar: Fix using unquoted keywords as DEFAULT values in constraints
MKleusberg commentedon May 3, 2017
Did you have a chance to test this yet, @FreudGit? 😃
justinclift commentedon May 17, 2017
@FreudGit Would you be ok to try out latest nightly build, and let us know if it's fixed for you? In theory, it should have been fixed a while back. 😄
FreudGit commentedon May 17, 2017
Can you please remind me how to get the last nightly? ?
justinclift commentedon May 17, 2017
Oops, sorry I should have mentioned it. The latest nightly builds are here:
https://nightlies.sqlitebrowser.org/latest/
justinclift commentedon Aug 20, 2017
Closing due to lack of response. 😦
justinclift commentedon Aug 20, 2017
@FreudGit If/when you see this, we just release a new major version (3.10.0) which has the fix for this in it. 😄