DCA: keys over multiple columns

Believe it or not, I’ve had a hard time finding how to apply keys over multiple columns in Contao’s DCA’s. It does work like that:

'config' => array(
    'sql' => array(
        'keys' => array(
            'id,f_ProductID' => 'primary'
        )
    )
),

That will create a primary key using id and f_ProductID.

No Comments

Post a Comment