launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04188
Re: DB patch numbering
On Tue, Aug 10, 2010 at 5:03 AM, Robert Collins
<robert.collins@xxxxxxxxxxxxx> wrote:
> On Tue, Aug 10, 2010 at 2:31 AM, Brad Crittenden <bac@xxxxxxxxxxxxx> wrote:
>> Hi Stuart,
>>
>> Last week Jono did a db review for me as you were not around. The patch
>> was approved but I took the next available number, patch-2207-81-0.sql.
>>
>> Please note it and let me know if there is a conflict.
>>
>> https://code.edge.launchpad.net/~bac/launchpad/db-bug-613442/+merge/31955
>>
>> --Brad
>
> Hi Brad; since the epic - and Stuarts update last week about DB
> process - please have either Stuart or I review DB patches - we want
> to stop distracting Jono with code :)
>
> https://dev.launchpad.net/PolicyAndProcess/DatabaseSchemaChangesProcess
>
> If I had seen that patch I would have raised a few questions with you:
> - is it possible to use NULL rather than an explicit value (will make
> the patch apply _much_ faster)
It applies faster, but will be less correct and make queries nuts as
you have to use 'IS' for checking for NULL and = for checking for
integer values. Using NULL as the default would require a data
migration job (populating the new column) and a second patch the
following cycle (adding in the NOT NULL constraint).
(Not that it matters - there are only 25k rows to update so it should be quick).
--
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/
Follow ups
References