Bug 957453: Fix error in database seed data user/dbs/lp957453_fix_stock_schema
authorDan Scott <dan@coffeecode.net>
Mon, 9 Apr 2012 12:59:55 +0000 (08:59 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 9 Apr 2012 13:04:21 +0000 (09:04 -0400)
commit5284542f468c5009a244b1f11ad751427427c153
tree91cd1a47b24a3761ebbfb459fd374ae1d6254dfa
parent1406a46bf12b1e9fdce323b917cf52a4296072d0
Bug 957453: Fix error in database seed data

The use of an explicit ID in creating a new
action_trigger.event_definition row was followed by the use of the
CURRVAL() function to grab the most recently issued value for
the action_trigger.event_defintion_id_seq sequence - which happened to
be 100, due to a previously issued SETVAL() on the sequence.

This resulted in references to non-existent event definitions and thus
an error in creating the stock database schema.

By using an explicit ID for the dependent row, we avoid this error.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/sql/Pg/950.data.seed-values.sql