#2423: sqlalchemy IntegrityError: insert on table "buildsets" violates foreign 
key
constraint "buildsets_sourcestampid_fkey"
-----------------------+---------------------
Reporter:  jaredgrubb  |       Owner:
    Type:  defect      |      Status:  closed
Priority:  major       |   Milestone:  0.9.0
 Version:  master      |  Resolution:  fixed
Keywords:              |
-----------------------+---------------------
Changes (by dustin):

 * status:  new => closed
 * resolution:   => fixed
 * milestone:  undecided => 0.9.0


Comment:

 Stupid Akismet.  If you link to a pastebin I can edit the Trac comment
 afterward and add the pastebin comments.  Next time..

 I'm assuming this is using Postgres, based on the error message.

 Oh!  I know what this is.  In 'nine' I noticed that the way the migration
 to sourcestampsets works, buildsets ends up with a foreign key reference
 from buildsets.sourcestampid to *both* sourcestamps.id *and*
 sourcestampsets.id.  I've fixed this in the 9/sourcestamps branch (as part
 of a much larger refactor).

 For your case, I suspect you could simply drop the bogus
 buildset_sourcestamps_fkey.  IIRC that looks like

 {{{
 ALTER TABLE buildsets drop foreign key buildset_sourcestamps_fkey
 }}}

 I don't think this is worth its own migration script (although I may
 change my mind if others run into the same thing).

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2423#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to