Hi,

I'm transitioning a table from a three way composite PK to a single integer 
PK thus:

   1. In the up:
      1. drop_constraint :jcus_requirements_orgs_pkey
      2. add_primary_key :id
      2. In the down:
      1. drop_constraint :jcus_requirements_pkey, type: :primary_key
      2. add_primary_key [:jcu_id, :requirement_id, :org_id], name: 
      :jcus_requirements_orgs_pkey
      
However, when running the down, the constraint is removed but the column 
remains. (Adding a name: :id didn't help but I doubt you're surprised by 
that.)

I wound up adding a drop_column :id in the down block which left me with a 
reciprocal up / down migration. (I'm picky that way.)

But I remain curious if I've missed a more obvious solution (to remove 
constraint and the named column in a single step) or if this is a bug. So . 
. . I thought I'd ask. :-)

Once more Jeremy, thank you for the great libraries and all you do for open 
source.

-JK

PS: If it matters, sequel 5.37, sequel_pg 1.8, pg 13

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/493e11a6-bab8-4451-8ff2-f3cc3e36b4dbn%40googlegroups.com.

Reply via email to