Links


Marc Munro

Marc's Postgres page









Introduction to Skit

Skit is a tool for managing database development. Its purpose is to allow the database definition to be managed using a Source Code Management system, and to provide the means to upgrade and patch databases in a similar way to that done for source code. It is being primarily developed for PostgreSQL but could esaily be extended to deal with other databases.

The name, skit, is a contraction of the term Schema Tools.

Skit has the following built-in capabilities:

Most skit commands are implemented through xml template files. Skit also provides an execute template file command which can be used to run custom commands. Templates can perform various xml-defined operations, including xsl transforms, and generating xml documents from simple sql queries. Examples of the sorts of things that could be done with custom templates include: automated erd generation automated creation of shadow tables and triggers for auditing database updates utomated generation of partitions for large tables

Skit may run many commands in a single session. Each command places its result(s) on an internal stack from which the next command will retrieve it. If the last command does not specify printing, and there is any document on the stack, the topmost document will be automatically printed.

Examples of skit commands:

skit –extract –connect “-h localhost -p 5435” --print

skit –extact

skit –extract –list

skit –extract –gather gatherrootdir –diff –list

skit –diff file1 file2

skit –gather gatherrootdir –list

skit –diff –swap file1 file2 –grep schema.x –generate

The first skit release is targetted for early 2009 and will be for postgres 8.1. Updates are expected to quickly follow for postgres 8.2 and 8.3. I am unlikely to write handlers for other databases but it could fairly easily be done.

More to follow, including architectural overviews, developer guidelines, etc.


Email the author, Marc Munro.