Using NHibernate With SQLite in DbUpdater

DbUpdater (version 1.3 onwards) can be used with sqlite3.

Review the files included in

1. DbUpdater.exe.config must be modified. Note changes to the following keys – exe-file, exe-args, dialect, driver_class, connetion_string.
2. SchemaVersion.hbm.xml must be modified. The ‘class’ attributes value for the ‘generator’ of ‘id’ must be changed to ‘identity’. No other changes are needed here.
3. \SqlScripts\schema-version-table.sql is modified. Note that the datatypes of all columns are changed to TEXT, except for SchemaChangeId, which is changed to integer primary key. integer primary key is used for auto-incremented columns in sqlite.
4. \SqlScripts\baseline.sql is modified. Note the use of current_timestamp function. The actual sql syntax in this file must conform to sqlite dialect.
5. All other .sql scripts in \SqlScripts directory are also modified to conform to sqlite dialect.

The following files are expected to be in DbUpdater.exe directory (as configured in the DbUpdater.exe.config file) –

1. sqlite3.exe : download.
2. System.Data.SQLite.dll : download.
3. createdb.bat file : This file is included. This batch script will call sqlite3.exe to execute sql queries.

Another very useful tool for working with sqlite database files is SQLite Database Browzer.

8 thoughts on “Using NHibernate With SQLite in DbUpdater

  1. Hi,

    I found a small bug in your dbupdater. If you execute the dbupdater with confirm:false, it will never execute any script.

    The error is probably in method private bool executeWorkFlow(SortedList sortedList, int index)

    Could you have a look at this and possibly correct the error?

  2. I am struggling to configure this software for Oracle, Can you please let me know how to change the configurations for Oracle?

  3. Praveen, Please provide some details about what you have tried, what worked and what didn’t work ? I will be glad to respond to a specific issue you are facing.

  4. Surprisingly I’m having a hard time to find resources showing NHibernate in action with SQLite, can you point me in the direction?


  5. Hi Pranay,

    Can you share with me what you have tried ? and what exactly are you having difficulty with ?

    I will be happy to answer any specific questions/issues you are having.


Leave a Reply

Your email address will not be published. Required fields are marked *