View Single Post
Old 02-12-2009, 09:05 AM   #21
kevin_boone
Enthusiast
kevin_boone began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Feb 2009
Device: prs-505
Quote:
Originally Posted by itimpi View Post
I looked at the triggers stored in the database, and did not spot any off-hand that related to tables/fields that were not in the database. However I agree I was not necessarily doing an exhaustive examination of the triggers.

However, as you said for the change you proposed it is unlikely to matter. Triggers tend to be used to ensure integrity rather than simply amending the value of an existing field that is not used for linking tables or indexing.
If you update a column in the `books' table, it triggers this:

CREATE TRIGGER books_update_trg
AFTER UPDATE ON books
BEGIN
UPDATE books SET sort=title_sort(NEW.title) WHERE id=NEW.id;
END;

I don't know what `title_sort' does, but it's not defined (so far as I can tell) in the database.

I could copy the data in books to another table with the same schema, but without the triggers, but then I couldn't copy it back. I could remove the triggers completely but then I guess Calibre would fall over.

Or am I missing something?
kevin_boone is offline   Reply With Quote