r17503 - gnucash/trunk/src/backend/sql - Remove constraint that lot.account_guid must not be null. Unfortunately,
Derek Atkins
warlord at MIT.EDU
Sun Sep 14 09:46:35 EDT 2008
Phil Longstaff <plongstaff at rogers.com> writes:
> warlord at MIT.EDU wrote:
>> Quoting Phil Longstaff <plongstaff at cvs.gnucash.org>:
>>
>>> Remove constraint that lot.account_guid must not be null.
>>> Unfortunately,
>>> sqlite doesn't support ALTER TABLE which modifies column constraints, so
>>> existing databases can't be modified programmatically.
>>
>> Can't you alter the table by creating a new temporary table with the
>> new constraints and then renaming it back to the original table name?
>>
>> We really need a process to be able to automatically update the
>> database schema as we update it.
>>
> Just committed. A per-table version number is kept, so the lots backend
> code can see what version currently exists in the db, what the
> up-to-date version is, and make the appropriate changes.
Cool. Thanks!
> Phil
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list