Re: [sqlite] alter table and .schema output

2016-05-30 Thread R Smith
On 2016/05/30 12:39 PM, Luca Ferrari wrote: On Mon, May 30, 2016 at 12:24 PM, Clemens Ladisch wrote: This is normal. The ALTER TABLE adds the new column(s) immediately behind the actual column definition. Inserting a comma before the comment and the rest of the new

Re: [sqlite] alter table and .schema output

2016-05-30 Thread Clemens Ladisch
Luca Ferrari wrote: > Is there a "correct" way to annotate SQL schema? Other databases > provides special commands (e.g., PostgreSQL ADD COMMENT), but I don't > see nothing in SQLIte3 syntax except the SQL '--' one. If those annotations are to be queried, put them into a table. Otherwise, if you

Re: [sqlite] alter table and .schema output

2016-05-30 Thread Luca Ferrari
On Mon, May 30, 2016 at 12:24 PM, Clemens Ladisch wrote: > This is normal. The ALTER TABLE adds the new column(s) immediately > behind the actual column definition. Inserting a comma before the > comment and the rest of the new column definition in the next line would > be

Re: [sqlite] alter table and .schema output

2016-05-30 Thread Clemens Ladisch
Luca Ferrari wrote: > CREATE TABLE pratica_protocollo( > ... > note varchar( 2048 ) -- note per l'integrazione > ); > > ALTER TABLE pratica_protocollo ADD COLUMN cage_attribuzione_anno >integer; > ALTER TABLE pratica_protocollo ADD COLUMN cage_attribuzione_numero >integer; > > and the

[sqlite] alter table and .schema output

2016-05-30 Thread Luca Ferrari
Hi all, I've a doubt about the SQL that .schema provides regarding a single table. I've a table that has been created (and reported back by .schema) as follows: CREATE TABLE pratica_protocollo( ... note varchar( 2048 ) -- note per l'integrazione ); The I ran the following: ALTER TABLE