Hi,

I have run into a similar issue for a hobby application of mine. If you are
interested, you can get a look at the code.

-Database SQL DDL is included in the source as string resources (fits the
scource control & install requirement)
-Build (don't know what you expect there, you may need to add some stuff)
- Database has a "version table" to handle installing the proper htings in
the proper order
- Each update change dbversion. Upgrades are run one after another in the
proper sequential order. Should be transacted and proeprly aborted, i do
not remember if I handle that in the code
- version detection : see above

Regards,

--
Stephane



On Fri, Jan 31, 2014 at 5:07 PM, Andreas Hofmann
<andreas.hofm...@ku7t.org>wrote:

> Sorry if some of these are no brainers, I am a sqlite newbie with some MS
> SQL experience.
>
>
>
> Our application uses 3 Sqlite dbs and System.Data.Sqlite.dll (dropped by
> installer). Functionality allows users to start a new instance of one of
> the
> databases at run time. Hence we ship empty databases in a binary format,
> created by one of our developers. The process of making changes to the DDL
> is basically using a sqlite admin tool, make the changes, then update the
> installer with the new db file.  I am looking for a better way how to
> automate this and have better source control integration.  At my other job,
> we got MS SQL ddl source files as text files in source control, verify them
> at build time, and then ship the scripts.
>
>
>
> I would like accomplish these (or at least some of these) for the Sqlite
> dbs:
>
>
>
> - text files for sql in source control
>
> - build them from command line during msbuild for syntax verification
>
> - ship text files in the installer (I know how to do that)
>
> - run the text files against a newly created db at run time in order
> "install" the schema and data (I think this is just a simple execute the
> sql
> ddl agains the db, right?)
>
> - support schema updates.  If V2 of the product ships, all dbs that are
> older should automatically be migrated to V2 when loaded.  Is this as
> simple
> as writing the ddl as IF COLUMN EXISTS etc. statements?
>
> - version detection. At run time need to detect that a given db is of
> version v1. simple column in dbversion table?
>
>
>
> Any pointers would be appreciated.
>
>
>
> Thanks
>
> Andy
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to