[Koha-bugs] [Bug 11390] DBIx::Class schema deployment script

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 21 07:38:50 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11390

--- Comment #7 from David Cook <dcook at prosentient.com.au> ---
So I've solved the issue of the timestamp, the varchar being turned into
text...

I think I know why the "DROP INDEXES" are in there... but I'm not sure how to
fix that except by giving those tables proper primary keys (which aren't
foreign keys to other tables). 

What else...

Oh! I tried dropping a foreign key just to see what would happen, and it got
nasty. 

1) It dropped the foreign key. Ok.
2) It dropped the index for the foreign key. Ok.

3) It tacked on an additional "Alter table" to the SQL statement rendering the
entire statement invalid. NOT OK :(.

This can be mitigated by using the "no_batch_alters" option, as it will
separate those 3 things into separate statements. So the foreign key gets
dropped correctly. The index gets dropped correctly. The final alter table...
is just completely ineffectual.

So that works... but it's sub-optimal...

--

By the way, the whole dropping of an index where the primary key is also a
foreign key... will generate errors because no index exists for it in the
database...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list