On Thu, 21 May 2015 12:45:41 +0200, "Christoph P.U. Kukulies" <kuku at kukulies.org> wrote:
>Am 21.05.2015 um 10:00 schrieb Kees Nuyt: >> On Thu, 21 May 2015 09:40:53 +0200, "Christoph P.U. Kukulies" >> <kuku at kukulies.org> wrote: >> >>> Am 21.05.2015 um 09:25 schrieb Hick Gunter: >>>> alter table [database] add column [real_length] numeric; >>> Thanks, that did it right. Almost. Still I'm wondering why >>> the output is >>> not as "smooth" as the >>> .fullschema listing before the ALTER ADD COLUMN: >>> (comma at line start, >> Alter table just adds ",your-row-spec" in front of ");". >> If you want it to be more consistent, use comma at line start >> for all column specs in the original schema. >> >>> lower case 'numeric') >> That can be fixed by using >> alter table [database] add column [real_length] NUMERIC; >> >> You can patch the layout of the CREATE TABLE statement in >> sqlite_master by using >> http://my.domain/sqlite.org/pragma.html#pragma_writable_schema I forgot to edit that link, should be http://www.sqlite.org/pragma.html#pragma_writable_schema >> and replacing the contents of the sql column with your preferred >> layout. >> It is dangerous, so read the warning, make backups first and >> test the result thoroughly! > > > Thanks. So you mean to use the pragma at run time in sqlite3, like: > sqlite> PRAGMA writable_schema = true; > sqlite> Yes, that. >or at compile time and recompile it? No, no compile time options required, the default sqlite3 command line will do. > To me it would probably far easier, to rebuild the schema > from ground up in sqlite3.exe since I'm still in a design phase. That's much better. For most of my projects I maintain the schema source in my project source tree, together with a few scripts with test data. The database is automaticaly created from that schema when it is missing (e.g. in make clean; make). -- Regards, Kees Nuyt