Using NHibernate With SQLite in DbUpdater

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

Review the files included in DbUpdater-sqlite3.zip

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.

Related posts

This entry was posted in code, database, opensource, sql and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

8 Comments

  1. Andreas Bellmann
    Posted January 19, 2009 at 8:08 am | Permalink

    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. Posted January 25, 2009 at 12:43 pm | Permalink

    Andreas, thanks for reporting the issue.

    I have fixed “confirm:false” bug. DbUpdater-1.4.0.2 can be downloaded here ; https://sourceforge.net/project/showfiles.php?group_id=232631

  3. Praveen
    Posted February 23, 2009 at 9:31 pm | Permalink

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

  4. Posted February 26, 2009 at 11:19 pm | Permalink

    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.

  5. Breezback
    Posted June 1, 2009 at 8:59 am | Permalink

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

    Thanks,

  6. Pranay
    Posted September 15, 2009 at 7:28 am | Permalink

    Hi

    I’m using mysql. but i can’t seem to get the configurations correct.
    Could you please help me.

    Thanks

  7. Posted September 27, 2009 at 2:07 pm | Permalink

    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.

    -ash

  8. Posted September 28, 2009 at 12:20 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Twitter Updates

  • Notes

    Using DbUpdater with MySql
    DbUpdater can be used with mysql. Here are the files you need to jumpstart the integration – DbUpdater-MySql.zip 1. You might need to change the path to mysql.exe in mysql-exec.bat. 2. Modify values in mysql-sample-command-line.bat. Make sure mysql.data.dll is placed in GAC or in the same directory as DbUpdater.exe. Connector binaries can be downloaded from here - http://dev.mysql.com/downloads/connector/net/6.1.html (0)

    Online Backup Solution
    Finalized online backup solution : JungleDisk. I can run it on all of my machines without paying extra. I get to keep the ownership of my data – by using my own Amazon S3 storage. Backed up all family photos – all 30 GBs. Feeling good (0)

    Switched to Thematic
    I have switched to Thematic theme on this blog over the weekend. I created a child theme after playing around with the customization hooks. I added a widgetized area below main asides, did some css modifications and created a three column, flexible layout just the way I wanted. I am so glad I switched to Thematic. ThemeShaper forums are very helpful. These articles were just what I needed to get started : How to make a child theme for WordPress and How I used a WordPress Child Theme To Redesign My Blog. (0)

  • BookShelf

    Planned books:

    • ASP.NET MVC in Action

      ASP.NET MVC in Action by Jeffrey Palermo, Ben Scheirman, Jimmy Bogard

    Current books:

    • Pragmatic Thinking and Learning: Refactor Your Wetware (Pragmatic Programmers)

      Pragmatic Thinking and Learning: Refactor Your Wetware (Pragmatic Programmers) by Andy Hunt

    • Working Effectively with Legacy Code

      Working Effectively with Legacy Code by Michael Feathers

    Recent books:

    • How I Got Published: Famous Authors Tell You in Their Own Words

      How I Got Published: Famous Authors Tell You in Their Own Words by Ray White

    • Pro WPF: Windows Presentation Foundation in .NET 3.0

      Pro WPF: Windows Presentation Foundation in .NET 3.0 by Matthew MacDonald

    • Programming Windows Presentation Foundation

      Programming Windows Presentation Foundation by Chris Sells, Ian Griffiths

    • Advanced MVVM

      Advanced MVVM by Josh Smith

    View full Library

Close
E-mail It