klo - 2014-10-12

Hi.

So being able to generate nice schema overviews on postgresql I wanted to see some sqlite databases.

Initial try went error as always, and Google did not list single working example how to get there.

Referencing http://schemaspy.sourceforge.net/dbtypes.html I come this far for setting properties:

description=SQLite
connectionSpec=jdbc:sqlite:<db>
driver=org.sqlite.JDBC
driverPath=drivers/sqlite-jdbc-3.8.6.jar

selectTablesSql=SELECT name AS table_name FROM sqlite_master WHERE type='table'
selectViewsSql=SELECT name AS view_name, sql AS view_definition FROM sqlite_master WHERE type='view'
#selectIndexesSql=PRAGMA index_list(:table)

selectViewSql=SELECT sql AS view_definition FROM sqlite_master WHERE type='view' AND name = ':view'
selectTableIdsSql=SELECT rootpage AS table_id, name AS table_name FROM sqlite_master WHERE type='table'
selectIndexIdsSql=SELECT rootpage AS index_id, name AS index_name, tbl_name AS table_name FROM sqlite_master WHERE type='index'

schemaSpec=main

but that's not enough as it complains "Unable to extract index" which is to be expected as there is no way to make selectIndexesSql on sqlite as this program is designed.
Desperate PRAGMA can't be executed by schemaSpy even thou columns returned are not in exact compliance to documentation.

That's why I thought to look for help and at least receive confirmation if generating schema view for sqlite is possible at all?

Thanks