Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

custom primary key in manifest

mitchoyoshitaka
Pepper Developer
Posted on Jan 16, '08 at 09:25 am

A manifest question: I’d like to use a custom primary key across two columns for my Pepper’s custom data. Is it possible to specify this in the manifest?

Thanks! mitcho

Till
Pepper Developer
Posted on Jan 16, '08 at 09:49 am

Not the first column will be used, but onInstall is called after syncManifest ; )

mitchoyoshitaka
Pepper Developer
Posted on Jan 16, '08 at 10:09 am

Alright, that was my thought as well… that worked. Is there any danger in dropping the Mint-made primary key and adding another?

mitcho

Shaun Inman
Mint/Pepper Developer
Posted on Jan 16, '08 at 10:32 am

Manipulating the table structure behind Mint’s back is going to bite you in the ass in the end. Say during uninstall when Mint tries to remove columns that no longer exist. Or when automatically moderating the table. I do not advise being too clever with your Pepper database.

mitchoyoshitaka
Pepper Developer
Posted on Jan 17, '08 at 02:53 am

Hm, then what do you recommend in this case, Shaun?

Till
Pepper Developer
Posted on Jan 17, '08 at 03:09 am

Why do you need an extra PRIMARY KEY?

Shaun Inman
Mint/Pepper Developer
Posted on Jan 17, '08 at 09:56 am

Or more specifically what exactly are you trying to achieve with the addition of another primary key? (AFAIK, a table can only have one primary key.)

You must be logged in to reply. Login above or create an account