Re: [sqlite] After column add, what should be done to update the schema?

2020-02-29 Thread Anthony DeRobertis

On 2/27/20 7:03 PM, Andy KU7T wrote:

Hi,

I use a simple ALTER TABLE ADD COLUMN statement. However, when I use the Sqlite 
Expert, the DDL is not reflected.


One thing to be aware of is that when SQLite adds the column, it often 
doesn't format it like you'd expect. For example:


CREATE TABLE a (
    col1 integer not null primary key,
    col2 integer
);

adding a column may well wind up with something like:

CREATE TABLE a (
    col1 integer not null primary key,
    col2 integer, col3 integer
);

... note how it's been tacked on to the same line as col2. That can make 
it easy to miss when reading through a pile of SQL.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] After column add, what should be done to update the schema?

2020-02-28 Thread Lee Gray
I just tried it in v5.3.5.470 and v5.3.5.472 and it worked fine.

From: sqlite-users  On Behalf Of 
Andy KU7T
Sent: Thursday, February 27, 2020 6:03 PM
To: SQLite mailing list 
Subject: [sqlite] After column add, what should be done to update the schema?

Hi,

I use a simple ALTER TABLE ADD COLUMN statement. However, when I use the Sqlite 
Expert, the DDL is not reflected. Even though the column is created. I read 
somewhere that the DDL is really just a copy of the text when teh table was 
created. Is there a way to refresh this?

Thanks,
Andy

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org>
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users<http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] After column add, what should be done to update the schema?

2020-02-28 Thread David Raymond
"I read somewhere that the DDL is really just a copy of the text when teh table 
was created"
It starts that way, but the ALTER TABLE command will update that string when it 
runs so that it reflects the new column.

Did you commit your changes after the alter table and before looking for the 
change in Sqlite Expert?

"However, when I use the Sqlite Expert, the DDL is not reflected. Even though 
the column is created."
Never having used Sqlite Expert, how are you determining that it was created? 
Further queries using the column work? Some GUI showing fields has been 
updated? Some other means?
When you say "the DDL is not reflected" how are you looking at the DDL? Is it 
some special window in Sqlite Expert? Are you explicitly running a select 
statement on sqlite_master? Some other method?

If you close Sqlite Expert and re-open it does it show the changes now?

At the moment it kind of sounds like Sqlite Expert is doing some sort of 
non-expert caching that it isn't updating the way it should.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] After column add, what should be done to update the schema?

2020-02-27 Thread Keith Medcalf

Probably a bug.  SQLiteExpert does not even run on my computer.  It just farts 
in the wind and does not even bother to log or show an error message.  Maybe it 
tries to access some internal Microsoft Spying mechanism that I have disabled.

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users  On
>Behalf Of Andy KU7T
>Sent: Thursday, 27 February, 2020 17:03
>To: SQLite mailing list 
>Subject: [sqlite] After column add, what should be done to update the
>schema?
>
>Hi,
>
>I use a simple ALTER TABLE ADD COLUMN statement. However, when I use the
>Sqlite Expert, the DDL is not reflected. Even though the column is
>created. I read somewhere that the DDL is really just a copy of the text
>when teh table was created. Is there a way to refresh this?
>
>Thanks,
>Andy
>
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] After column add, what should be done to update the schema?

2020-02-27 Thread Jean-Christophe Deschamps

Bonjour,

I use a simple ALTER TABLE ADD COLUMN statement. However, when I use 
the Sqlite Expert, the DDL is not reflected. Even though the column is 
created. I read somewhere that the DDL is really just a copy of the 
text when teh table was created. Is there a way to refresh this?


I can't reproduce the issue with neither Expert v3.5.96 nor v5.3.5.472.
Post a short reproducer.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] After column add, what should be done to update the schema?

2020-02-27 Thread Andy KU7T
Hi,

I use a simple ALTER TABLE ADD COLUMN statement. However, when I use the Sqlite 
Expert, the DDL is not reflected. Even though the column is created. I read 
somewhere that the DDL is really just a copy of the text when teh table was 
created. Is there a way to refresh this?

Thanks,
Andy

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users