I do think that SQLite3 will eventually need to grow ALTER support for
altering constraints.  This whole copy-the-table thing is not really a
scalable solution.  Without such ALTER functionality users will often
have to implement all constraints as triggers and/or unique indexes
instead of using core SQLite3 functionality.

In the meantime, there is a hack that might work: close all but one
handle to the DB (quiesce the DB), make the schema writable, update
the definition in sqlite_master, bump the schema version, close the
handle you're using, then re-open the DB.  As long as you know what
you're doing this should work, IIUC.  You must not make changes to the
schema that are incompatible with what was there before, and in the
case of foreign keys you might need to manually create any required
indexes.

Nico
--
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to