On 4/22/16, Dimitris Bilidas <d.bilidas at di.uoa.gr> wrote: > CREATE TABLE discovery( dscName TEXT,cmpLongName > TEXT,dscCurrentActivityStatus TEXT,dscHcType TEXT,wlbName TEXT,nmaName > TEXT,fldName TEXT,dscDateFromInclInField TEXT,dscDiscoveryYear > INTEGER,dscResInclInDiscoveryName TEXT,dscOwnerKind TEXT,dscOwnerName > TEXT,dscNpdidDiscovery INTEGER,fldNpdidField INTEGER,wlbNpdidWellbore > INTEGER,dscFactPageUrl TEXT,dscFactMapUrl TEXT,dscDateUpdated > TEXT,dscDateUpdatedMax TEXT,dateSyncNPD TEXT);
In the next release, the ".schema" command will support a command-line option "--indent" which does pretty-printing of the schema, turning the above into the example shown below. The pretty-printer is simple but it seems to work. I would appreciate it if readers of this list would build the latest trunk version of SQLite, try out this new featuers on their own schemas, and send me examples of cases where it falls down, so that it can be improved. Also, suggestions for a better option name (other than "--indent") are welcomed. CREATE TABLE discovery( dscName TEXT, cmpLongName TEXT, dscCurrentActivityStatus TEXT, dscHcType TEXT, wlbName TEXT, nmaName TEXT, fldName TEXT, dscDateFromInclInField TEXT, dscDiscoveryYear INTEGER, dscResInclInDiscoveryName TEXT, dscOwnerKind TEXT, dscOwnerName TEXT, dscNpdidDiscovery INTEGER, fldNpdidField INTEGER, wlbNpdidWellbore INTEGER, dscFactPageUrl TEXT, dscFactMapUrl TEXT, dscDateUpdated TEXT, dscDateUpdatedMax TEXT, dateSyncNPD TEXT ); -- D. Richard Hipp drh at sqlite.org