[PATCH 3/5] sms: Add a function to update DB scheme v3 to v4.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Alexander Chemeris alexander.chemeris at gmail.com
Sun Feb 9 09:15:45 UTC 2014


On Sun, Feb 9, 2014 at 1:14 PM, Alexander Chemeris
<alexander.chemeris at gmail.com> wrote:
> Hi Holger,
>
> On Sat, Feb 8, 2014 at 6:42 PM, Holger Hans Peter Freyther
> <holger at freyther.de> wrote:
>> On Tue, Oct 08, 2013 at 12:01:55PM +0200, Holger Hans Peter Freyther wrote:
>>
>> Hi Alexander,
>>
>> I would like to get this patchset included and I noticed that you
>> have never followed up on this comment.
>>
>>> > +#define SMS_TABLE_CREATE_STMT \
>>
>>>
>>> Can you propose an alternative to move this out of the array?
>>
>> Couldn't you use ALTER TABLE from within a transaction?
>
> No, ALTER TABLE can't be used, because it can only add column in
> SQLIte and can't remove them. The whole twist with this code is to
> workaround this limitation. It was discussed a while ago in the
> original topic.
>
> Actually, I would propose to move all other statements in that array
> to #define's as well to make the code more readable.

Btw, I did reply to this question earlier in the thread. :)
My original reply was:

Frankly speaking, I would move _all_ these statements to separate
#defines, to make the code clearer.

And no, I don't see a better way to do that.

-- 
Regards,
Alexander Chemeris.
CEO, Fairwaves LLC / ООО УмРадио
http://fairwaves.ru




More information about the OpenBSC mailing list