[OpenSER-Devel] Defining MySQL foreign key constraint

Henning Westerholt henning.westerholt at 1und1.de
Wed Jul 18 12:08:02 CEST 2007


On Monday 16 July 2007, Dan Pascu wrote:
> While it can't be applied to the core openser tables that need to work
> with all supported databases, nevertheless it can be useful to people
> trying to write custom modules that do not necessarily support all
> database types, or for custom tables that are used directly from the
> script using AVP database query operations.
>
> So I believe it can be an useful addition even if it isn't used by the
> main tables.

Hello,

we discussed this topic yesterday in the devel meeting, and decided to stay 
for now with the functionality neeeded for OpenSER. But extensions to the 
datatypes are not to hard to implement. Just take a look into the mysql.xsl 
file, 'column.type' template, and add the needed datatype.

E.g.:

<xsl:when test="$type='double'">
		<xsl:text>DOUBLE</xsl:text>
		<xsl:call-template name="column.size"/>
		<xsl:call-template name="column.trailing"/>
</xsl:when>


$type is string compared to the given datatype, e.g. double. And then the 
xsl:text content is copied to the node.

Cheers,

Henning



More information about the Devel mailing list