[sr-dev] new columns in active_watchers/rls_watchers/silo

Daniel-Constantin Mierla miconda at gmail.com
Fri May 4 12:01:41 CEST 2012


Hello,

you are right.

The tool I used to compare the databases structures and get the SQL 
statements for upgrade seems to be buggy for text columns, it gave the 
result:

ALTER TABLE silo ADD COLUMN extra_hdrs text NOT NULL;

But in kamctl the definition is with DEFAULT ''

Thanks,
Daniel

On 5/4/12 11:57 AM, Hugh Waite wrote:
> Hello,
> The current definition of the extra_hdrs is:
> <column>
> <name>extra_hdrs</name>
> <type>text</type>
> <default/>
> <description>Extra headers that must be restored</description>
> </column>
> which results in
> extra_hdrs TEXT DEFAULT '' NOT NULL
> in mysql and postgres. This has a default value. Do you think it 
> should have both a default and be allowed to be NULL?
>
> Regards,
> Hugh
>
>
> On 04/05/2012 08:40, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> looking at changes in the database structure from 3.2 to 3.3, I 
>> noticed the columns in active_watchers/rls_watches that have no 
>> default value and cannot be NULL.
>>
>> The usual issue with this kind of upgrades is that existing rows have 
>> to be removed. active_watchers is with temporary records, and I guess 
>> that is the same with rls_watchers. No persistent data is to be lost, 
>> right?
>>
>> Another one is extra_hdrs in silo table. I think it should be allowed 
>> to be NULL or default '' (empty string), so stored messages will not 
>> be lost - the check over the code showed inserting '' if no extra 
>> headers are present at message storage time.
>>
>> Cheers,
>> Daniel
>>
>
>
> -- 
> Hugh Waite
> Senior Design Engineer
> Crocodile RCS Ltd.

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120504/4e2dce05/attachment.htm>


More information about the sr-dev mailing list