[OPEN-ILS-DEV] 2.1 RC2 upgrade script testing

Mike Rylander mrylander at gmail.com
Mon Aug 22 12:26:31 EDT 2011


On Sat, Aug 20, 2011 at 3:46 PM, Dan Scott <dan at coffeecode.net> wrote:
> On Sat, Aug 20, 2011 at 10:05 AM, Ben Shum <bshum at biblio.org> wrote:
>> Hi Mike,
>>
>> I think this approach will work great, unless the site in question
>> doesn't have the correct ID values appropriate to the code.  In our
>> case, since we had identified some missing permissions didn't exist yet
>> in 2.0, but required it before the community had added them, something
>> like "MARK_ITEMS_MISSING_PIECES" was given an ID on our system of 1003
>> (a custom ID) and therefore this script couldn't match and find it.
>>
>> For fun though, I changed the last left join to match on "code" instead
>> of "id" and this allowed the script to proceed fully, leaving the custom
>> ID's we used intact while inserting the rest of the new permissions.
>> Ideally though, I should modify our system to match the
>> community-selected IDs as they become known.  I imagine that they're
>> given a particular ID for a reason so that they can be assigned to
>> specific default permission groups later on?
>
> We're relying on 'code' in 950.sql to create permission groups, at
> least in master, so it would make sense IMO to adopt the same approach
> in the upgrade script and avoid synthetic ID conflicts for a table
> that has a perfectly good natural key.
>

I'll proceed with the fixes outlined for now, but it raises the
question of moving the pkey to code in master ... I think now is the
right time, if we're fairly certain that all the perms we need from
master are indeed backported to 2.1 already.  What's the general
feeling on that?

-- 
Mike Rylander
 | Director of Research and Development
 | Equinox Software, Inc. / Your Library's Guide to Open Source
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list