Re: [PATCH] No PANIC on failing store_load()

spameden <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <CAHCALex=2MB8E8nBJJgDfcPwH34r9bNZmj6Qx7pu2N=fuSY2Vg@mail.gmail.com>
2013/9/17 Stipe Tolj <[email protected]>:
> Am 17.09.2013 16:54, schrieb Willy Mularto:
>
>> Thanks for your review. The other approach is to override the sms_type
>> value during the INSERT.
>
>
> yep, most DBMSs allow setting "default values", in case the INSERT statement
> does not insert a specific value for the field. That was my idea. It's
> cleaner, and leaves the value injection to the DB layer.

for MySQL I use this:

`sms_type` tinyint(1) DEFAULT '2'

would be good to alter CREATE TABLE statements for each DBMS and also
change bigint(20) where its not needed to reduce size of the tables.

>
>
> Stipe
>
> --
> -------------------------------------------------------------------
> Kölner Landstrasse 419
> 40589 Düsseldorf, NRW, Germany
>
> tolj.org system architecture      Kannel Software Foundation (KSF)
> http://www.tolj.org/              http://www.kannel.org/
>
> mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
> -------------------------------------------------------------------
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.