← Back to team overview

launchpad-dev team mailing list archive

Re: Adding required app data to databases

 



On Thu, Mar 11, 2010 at 2:47 AM, Francis J. Lacoste <francis.lacoste@xxxxxxxxxxxxx> wrote:
On March 10, 2010, Curtis Hovey wrote:
Hi Stuart.

I am having a moment of uncertainty. I want to add new karmaactions and
a new karmacategory for the registry. I think there is something
fundamentally wrong with karma (and celebrities). But I may be confused.

I was using a patch to add the new data and I had to hardcode the serial
to avoid a constraint violation with karmaaction_pkey. Edwin explained
that the problem was not my patch, but that sampledata was loaded after
the patch was applied.

I think that instead of writing a patch, I should provide a migration
script that can be run on dev to make the current.sql and
current-dev.sql, and then run in staging and production. This sounds
somewhat risky, and we do not want to create new sampledata.

Yes, that's how I did way back when I added the answers karma category.

Yup. We generally want to add the new data to production before the code lands, or edge and/or staging might explode.

The Karma stuff very nearly was an enum, but it was thought we might want to edit this information through the web UI to fine tune scores etc.


--
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/

Attachment: signature.asc
Description: OpenPGP digital signature


References