On 9/8/16, Stephen Chrzanowski <[email protected]> wrote:
>
> However, the rabbit I was hoping to pull out of the hat was that the change
> in version numbers be done automatically when I make a change in the 3rd
> party DB management tool.
Perhaps make your application schema-version number a hash of the SQL
for the schema, like this:
SELECT md5sum(sql) FROM (
SELECT sql FROM sqlite_master
WHERE sql IS NOT NULL
ORDER BY sql
);
You will need to add the md5sum() aggregate function yourself. A
sample implementation can be found in the SQLite source tree (used for
testing) here: https://www.sqlite.org/src/artifact/bdae822f2?ln=3894-3932
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users