View Single Post
Old 05-11-2018, 08:14 AM   #147
yonkyunior
Cultivator
yonkyunior doesn't litteryonkyunior doesn't litteryonkyunior doesn't litter
 
yonkyunior's Avatar
 
Posts: 94
Karma: 216
Join Date: Feb 2015
Device: PRST2
Quote:
Originally Posted by DaltonST View Post
https://www.mobileread.com/forums/at...5&d=1441811746

Did you read the attachment about Triggers that is a companion to the one you quote?

DaltonST

Quote:
Step 5D:

CLOSE the Pristine db in your SQL tool. CONNECT the Target library by itself. Then run this sql:

CREATE TRIGGER books_insert_trg AFTER INSERT ON books
BEGIN
UPDATE books SET sort=title_sort(NEW.title),uuid=uuid4() WHERE id=NEW.id;
END;
This? i don't know the order related to this, should it be execute in beginning or after what steps?

Quote:
In Release 2.37 of Standard Calibre this was changed, and it too must be DROPPed and then reCREATEd too:

CREATE TRIGGER series_insert_trg
AFTER INSERT ON series
BEGIN
UPDATE series SET sort=title_sort(NEW.name) WHERE id=NEW.id;
END

title_sort() is user-defined.
----------------------

Step 5:

DROP trigger series_insert_trg;

i think i miss this..

tq

Last edited by yonkyunior; 05-11-2018 at 08:28 AM.
yonkyunior is offline   Reply With Quote