[Buildbot] #3504: PosgreSQL foreign key error upon reconfigure

Buildbot trac trac at buildbot.net
Fri Apr 1 17:21:06 UTC 2016


#3504: PosgreSQL foreign key error upon reconfigure
----------------------+--------------------
Reporter:  gracinet   |       Owner:
    Type:  undecided  |      Status:  new
Priority:  major      |   Milestone:  0.9.0
 Version:  0.9.0b7    |  Resolution:
Keywords:             |
----------------------+--------------------

Comment (by gracinet):

 I can reproduce reliably, but this happens only with `buildbot reconfig`.
 Given that `buildbot restart` deletes the `configured_workers` row in that
 case, I'd wager we can simply use a foreign key with cascading delete
 option.

 SQLAlchemy supports this, at least since version 0.7:
 http://docs.sqlalchemy.org/en/latest/core/constraints.html#on-update-and-
 on-delete
 http://docs.sqlalchemy.org/en/rel_0_7/core/schema.html?highlight=foreignkey
 #on-update-and-on-delete

 Here's the paragraph mentioning them in PostgreSQL documentation (it's
 been there forever):
 http://www.postgresql.org/docs/9.5/static/ddl-constraints.html#DDL-
 CONSTRAINTS-FK

 I don't now how exactly to handle upgrade of the DB (if needed at all in
 these beta series)

--
Ticket URL: <http://trac.buildbot.net/ticket/3504#comment:4>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list