Re: [PATCH] foreign_id support for sqlbox
Stipe Tolj <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Kannel Software Foundation (KSF) |
| Message-ID | <[email protected]> |
Am 02.10.2012 22:52, schrieb Rene Kluwen:
> The patch is a little bit difficult to read, but I get the concept.
> One disadvantage of this patch is that it is backward incompatible. You need
> to re-create the sqlbox tables and thereby you lose your old information.
> If you are unaware of this incompatibility, and not recreate your tables,
> sqlbox will suddenly fail to work.
>
> Have you thought of a solution for this problem?
that's a viable argument, I agree. We need to inform the user that he
needs to ALTER the table schema in order to have the 'foreign_id' available.
I would suggest even to aim a bit higher here:
a) remove the explicit msg struct field usage in the sqlbox code base,
and use our pre-processor magic around the gw/msg-decl.h code to create
all the required string dependencies here.
b) this allows us also to perform "field exists" tests on the table
schema, and if a field doesn't exist we can create/delete it via ALTER
SQL command.
Doing a) is considerable easy, it's only some effort to make it right
here. Doing b) is a bit harder, since this will be DB type specific I guess.
Anyone having ideas on how schema changes can be "tested" against via SQL?
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
-------------------------------------------------------------------