init-b2b.sql 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217
  1. -- 创建消息表
  2. drop table if exists lucene$message;
  3. create table lucene$message(
  4. me_id bigint not null primary key auto_increment,
  5. me_table_name varchar(64) not null,
  6. me_method_type varchar(6) not null,
  7. me_data_id int not null,
  8. me_data text,
  9. me_priority int default 0,
  10. me_retry_count int default 0,
  11. me_create_time datetime not null
  12. );
  13. -- 创建消息历史表
  14. drop table if exists lucene$message_history;
  15. create table lucene$message_history(
  16. mh_id bigint not null primary key auto_increment,
  17. mh_dequeue_time datetime not null,
  18. me_id bigint not null,
  19. me_table_name varchar(64) not null,
  20. me_method_type varchar(6) not null,
  21. me_data_id int not null,
  22. me_data text,
  23. me_priority int default 0,
  24. me_create_time datetime not null
  25. );
  26. -- 创建存储过程 入队消息
  27. drop procedure if exists enqueue_lucene_message;
  28. delimiter $$
  29. create procedure enqueue_lucene_message(in v_table_name varchar(64), v_method_type varchar(6), v_data_id int, v_data text, v_priority int)
  30. begin
  31. insert into lucene$message (me_table_name, me_method_type, me_data_id, me_data, me_priority, me_create_time) values(v_table_name, v_method_type, v_data_id, v_data, v_priority, sysdate());
  32. end;$$
  33. delimiter ;
  34. -- 创建存储过程 出队消息
  35. drop procedure if exists dequeue_lucene_message;
  36. delimiter $$
  37. create procedure dequeue_lucene_message(in v_id bigint)
  38. begin
  39. insert into lucene$message_history (mh_dequeue_time, me_id, me_table_name, me_method_type, me_data_id, me_data, me_priority, me_create_time) select sysdate(), me_id, me_table_name, me_method_type, me_data_id, me_data, me_priority, me_create_time from lucene$message where me_id = v_id;
  40. delete from lucene$message where me_id = v_id;
  41. end;$$
  42. delimiter ;
  43. -- ----------------------------
  44. -- Triggers structure for table PURC$CHANGES
  45. -- ----------------------------
  46. DROP TRIGGER IF EXISTS `lucene_purc_changes_i`;
  47. delimiter ;;
  48. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_changes_i` AFTER INSERT ON `PURC$CHANGES` FOR EACH ROW begin
  49. declare v_table_name varchar(64) default 'PURC$CHANGES';
  50. declare v_method_type varchar(6) default 'insert';
  51. declare v_data_id int;
  52. declare v_data text default null;
  53. declare v_priority int default 1;
  54. set v_data_id=new.pc_id;
  55. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  56. end
  57. ;;
  58. delimiter ;
  59. -- ----------------------------
  60. -- Triggers structure for table PURC$CHANGES
  61. -- ----------------------------
  62. DROP TRIGGER IF EXISTS `lucene_purc_changes_u`;
  63. delimiter ;;
  64. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_changes_u` AFTER UPDATE ON `PURC$CHANGES` FOR EACH ROW begin
  65. declare v_table_name varchar(64) default 'PURC$CHANGES';
  66. declare v_method_type varchar(6) default 'update';
  67. declare v_data_id int;
  68. declare v_data text default null;
  69. declare v_priority int default 1;
  70. set v_data_id=old.pc_id;
  71. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  72. end
  73. ;;
  74. delimiter ;
  75. -- ----------------------------
  76. -- Triggers structure for table purc$changes
  77. -- ----------------------------
  78. DROP TRIGGER IF EXISTS `lucene_purc_changes_d`;
  79. delimiter ;;
  80. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_changes_d` AFTER DELETE ON `purc$changes` FOR EACH ROW begin
  81. declare v_table_name varchar(64) default 'purc$changes';
  82. declare v_method_type varchar(6) default 'delete';
  83. declare v_data_id int;
  84. declare v_data text default null;
  85. declare v_priority int default 1;
  86. set v_data_id=old.pc_id;
  87. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  88. end
  89. ;;
  90. delimiter ;
  91. -- ----------------------------
  92. -- Triggers structure for table purc$forecast
  93. -- ----------------------------
  94. DROP TRIGGER IF EXISTS `lucene_purc_forecast_i`;
  95. delimiter ;;
  96. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_forecast_i` AFTER INSERT ON `purc$forecast` FOR EACH ROW begin
  97. declare v_table_name varchar(64) default 'purc$forecast';
  98. declare v_method_type varchar(6) default 'insert';
  99. declare v_data_id int;
  100. declare v_data text default null;
  101. declare v_priority int default 0;
  102. set v_data_id=new.pf_id;
  103. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  104. end
  105. ;;
  106. delimiter ;
  107. -- ----------------------------
  108. -- Triggers structure for table purc$forecast
  109. -- ----------------------------
  110. DROP TRIGGER IF EXISTS `lucene_purc_forecast_u`;
  111. delimiter ;;
  112. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_forecast_u` AFTER UPDATE ON `purc$forecast` FOR EACH ROW begin
  113. declare v_table_name varchar(64) default 'purc$forecast';
  114. declare v_method_type varchar(6) default 'update';
  115. declare v_data_id int;
  116. declare v_data text default null;
  117. declare v_priority int default 0;
  118. set v_data_id=old.pf_id;
  119. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  120. end
  121. ;;
  122. delimiter ;
  123. -- ----------------------------
  124. -- Triggers structure for table purc$forecast
  125. -- ----------------------------
  126. DROP TRIGGER IF EXISTS `lucene_purc_forecast_d`;
  127. delimiter ;;
  128. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_forecast_d` AFTER DELETE ON `purc$forecast` FOR EACH ROW begin
  129. declare v_table_name varchar(64) default 'purc$forecast';
  130. declare v_method_type varchar(6) default 'delete';
  131. declare v_data_id int;
  132. declare v_data text default null;
  133. declare v_priority int default 0;
  134. set v_data_id=old.pf_id;
  135. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  136. end
  137. ;;
  138. delimiter ;
  139. -- ----------------------------
  140. -- Triggers structure for table purc$mrb
  141. -- ----------------------------
  142. DROP TRIGGER IF EXISTS `lucene_purc_mrb_i`;
  143. delimiter ;;
  144. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_mrb_i` AFTER INSERT ON `purc$mrb` FOR EACH ROW begin
  145. declare v_table_name varchar(64) default 'purc$mrb';
  146. declare v_method_type varchar(6) default 'insert';
  147. declare v_data_id int;
  148. declare v_data text default null;
  149. declare v_priority int default 1;
  150. set v_data_id=new.pm_id;
  151. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  152. end
  153. ;;
  154. delimiter ;
  155. -- ----------------------------
  156. -- Triggers structure for table purc$mrb
  157. -- ----------------------------
  158. DROP TRIGGER IF EXISTS `lucene_purc_mrb_u`;
  159. delimiter ;;
  160. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_mrb_u` AFTER UPDATE ON `purc$mrb` FOR EACH ROW begin
  161. declare v_table_name varchar(64) default 'purc$mrb';
  162. declare v_method_type varchar(6) default 'update';
  163. declare v_data_id int;
  164. declare v_data text default null;
  165. declare v_priority int default 1;
  166. set v_data_id=old.pm_id;
  167. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  168. end
  169. ;;
  170. delimiter ;
  171. -- ----------------------------
  172. -- Triggers structure for table purc$mrb
  173. -- ----------------------------
  174. DROP TRIGGER IF EXISTS `lucene_purc_mrb_d`;
  175. delimiter ;;
  176. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_mrb_d` AFTER DELETE ON `purc$mrb` FOR EACH ROW begin
  177. declare v_table_name varchar(64) default 'purc$mrb';
  178. declare v_method_type varchar(6) default 'delete';
  179. declare v_data_id int;
  180. declare v_data text default null;
  181. declare v_priority int default 1;
  182. set v_data_id=old.pm_id;
  183. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  184. end
  185. ;;
  186. delimiter ;
  187. -- ----------------------------
  188. -- Triggers structure for table purc$notice
  189. -- ----------------------------
  190. DROP TRIGGER IF EXISTS `lucene_purc_notice_i`;
  191. delimiter ;;
  192. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_notice_i` AFTER INSERT ON `purc$notice` FOR EACH ROW begin
  193. declare v_table_name varchar(64) default 'purc$notice';
  194. declare v_method_type varchar(6) default 'update';
  195. declare v_data_id int;
  196. declare v_data text default null;
  197. declare v_priority int default 0;
  198. set v_data_id=new.pn_id;
  199. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  200. end
  201. ;;
  202. delimiter ;
  203. -- ----------------------------
  204. -- Triggers structure for table purc$notice
  205. -- ----------------------------
  206. DROP TRIGGER IF EXISTS `lucene_purc_notice_u`;
  207. delimiter ;;
  208. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_notice_u` AFTER UPDATE ON `purc$notice` FOR EACH ROW begin
  209. declare v_table_name varchar(64) default 'purc$notice';
  210. declare v_method_type varchar(6) default 'update';
  211. declare v_data_id int;
  212. declare v_data text default null;
  213. declare v_priority int default 0;
  214. set v_data_id=old.pn_id;
  215. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  216. end
  217. ;;
  218. delimiter ;
  219. -- ----------------------------
  220. -- Triggers structure for table purc$notice
  221. -- ----------------------------
  222. DROP TRIGGER IF EXISTS `lucene_purc_notice_d`;
  223. delimiter ;;
  224. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_notice_d` AFTER DELETE ON `purc$notice` FOR EACH ROW begin
  225. declare v_table_name varchar(64) default 'purc$notice';
  226. declare v_method_type varchar(6) default 'update';
  227. declare v_data_id int;
  228. declare v_data text default null;
  229. declare v_priority int default 0;
  230. set v_data_id=old.pn_id;
  231. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  232. end
  233. ;;
  234. delimiter ;
  235. -- ----------------------------
  236. -- Triggers structure for table purc$orders
  237. -- ----------------------------
  238. DROP TRIGGER IF EXISTS `lucene_purc_orders_i`;
  239. delimiter ;;
  240. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_orders_i` AFTER INSERT ON `purc$orders` FOR EACH ROW begin
  241. declare v_table_name varchar(64) default 'purc$orders';
  242. declare v_method_type varchar(6) default 'insert';
  243. declare v_data_id int;
  244. declare v_data text default null;
  245. declare v_priority int default 0;
  246. set v_data_id=new.pu_id;
  247. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  248. end
  249. ;;
  250. delimiter ;
  251. -- ----------------------------
  252. -- Triggers structure for table purc$orders
  253. -- ----------------------------
  254. DROP TRIGGER IF EXISTS `lucene_purc_orders_u`;
  255. delimiter ;;
  256. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_orders_u` AFTER UPDATE ON `purc$orders` FOR EACH ROW begin
  257. declare v_table_name varchar(64) default 'purc$orders';
  258. declare v_method_type varchar(6) default 'update';
  259. declare v_data_id int;
  260. declare v_data text default null;
  261. declare v_priority int default 0;
  262. set v_data_id=old.pu_id;
  263. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  264. end
  265. ;;
  266. delimiter ;
  267. -- ----------------------------
  268. -- Triggers structure for table purc$orders
  269. -- ----------------------------
  270. DROP TRIGGER IF EXISTS `lucene_purc_orders_d`;
  271. delimiter ;;
  272. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_orders_d` AFTER DELETE ON `purc$orders` FOR EACH ROW begin
  273. declare v_table_name varchar(64) default 'purc$orders';
  274. declare v_method_type varchar(6) default 'delete';
  275. declare v_data_id int;
  276. declare v_data text default null;
  277. declare v_priority int default 0;
  278. set v_data_id=old.pu_id;
  279. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  280. end
  281. ;;
  282. delimiter ;
  283. -- ----------------------------
  284. -- Triggers structure for table purc$proofingapproval
  285. -- ----------------------------
  286. DROP TRIGGER IF EXISTS `lucene_purc_proofingapproval_i`;
  287. delimiter ;;
  288. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingapproval_i` AFTER INSERT ON `purc$proofingapproval` FOR EACH ROW begin
  289. declare v_table_name varchar(64) default 'purc$proofingapproval';
  290. declare v_method_type varchar(6) default 'insert';
  291. declare v_data_id int;
  292. declare v_data text default null;
  293. declare v_priority int default 0;
  294. set v_data_id=new.psa_id;
  295. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  296. end
  297. ;;
  298. delimiter ;
  299. -- ----------------------------
  300. -- Triggers structure for table purc$proofingapproval
  301. -- ----------------------------
  302. DROP TRIGGER IF EXISTS `lucene_purc_proofingapproval_u`;
  303. delimiter ;;
  304. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingapproval_u` AFTER UPDATE ON `purc$proofingapproval` FOR EACH ROW begin
  305. declare v_table_name varchar(64) default 'purc$proofingapproval';
  306. declare v_method_type varchar(6) default 'update';
  307. declare v_data_id int;
  308. declare v_data text default null;
  309. declare v_priority int default 0;
  310. set v_data_id=old.psa_id;
  311. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  312. end
  313. ;;
  314. delimiter ;
  315. -- ----------------------------
  316. -- Triggers structure for table purc$proofingapproval
  317. -- ----------------------------
  318. DROP TRIGGER IF EXISTS `lucene_purc_proofingapproval_d`;
  319. delimiter ;;
  320. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingapproval_d` AFTER DELETE ON `purc$proofingapproval` FOR EACH ROW begin
  321. declare v_table_name varchar(64) default 'purc$proofingapproval';
  322. declare v_method_type varchar(6) default 'delete';
  323. declare v_data_id int;
  324. declare v_data text default null;
  325. declare v_priority int default 0;
  326. set v_data_id=old.psa_id;
  327. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  328. end
  329. ;;
  330. delimiter ;
  331. -- ----------------------------
  332. -- Triggers structure for table purc$proofingsend
  333. -- ----------------------------
  334. DROP TRIGGER IF EXISTS `lucene_purc_proofingsend_i`;
  335. delimiter ;;
  336. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingsend_i` AFTER INSERT ON `purc$proofingsend` FOR EACH ROW begin
  337. declare v_table_name varchar(64) default 'purc$proofingsend';
  338. declare v_method_type varchar(6) default 'insert';
  339. declare v_data_id int;
  340. declare v_data text default null;
  341. declare v_priority int default 0;
  342. set v_data_id=new.pps_id;
  343. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  344. end
  345. ;;
  346. delimiter ;
  347. -- ----------------------------
  348. -- Triggers structure for table purc$proofingsend
  349. -- ----------------------------
  350. DROP TRIGGER IF EXISTS `lucene_purc_proofingsend_u`;
  351. delimiter ;;
  352. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingsend_u` AFTER UPDATE ON `purc$proofingsend` FOR EACH ROW begin
  353. declare v_table_name varchar(64) default 'purc$proofingsend';
  354. declare v_method_type varchar(6) default 'update';
  355. declare v_data_id int;
  356. declare v_data text default null;
  357. declare v_priority int default 0;
  358. set v_data_id=old.pps_id;
  359. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  360. end
  361. ;;
  362. delimiter ;
  363. -- ----------------------------
  364. -- Triggers structure for table purc$proofingsend
  365. -- ----------------------------
  366. DROP TRIGGER IF EXISTS `lucene_purc_proofingsend_d`;
  367. delimiter ;;
  368. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingsend_d` AFTER DELETE ON `purc$proofingsend` FOR EACH ROW begin
  369. declare v_table_name varchar(64) default 'purc$proofingsend';
  370. declare v_method_type varchar(6) default 'delete';
  371. declare v_data_id int;
  372. declare v_data text default null;
  373. declare v_priority int default 0;
  374. set v_data_id=old.pps_id;
  375. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  376. end
  377. ;;
  378. delimiter ;
  379. -- ----------------------------
  380. -- Triggers structure for table purc$return
  381. -- ----------------------------
  382. DROP TRIGGER IF EXISTS `lucene_purc_return_i`;
  383. delimiter ;;
  384. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_return_i` AFTER INSERT ON `purc$return` FOR EACH ROW begin
  385. declare v_table_name varchar(64) default 'purc$return';
  386. declare v_method_type varchar(6) default 'insert';
  387. declare v_data_id int;
  388. declare v_data text default null;
  389. declare v_priority int default 0;
  390. set v_data_id=new.pr_id;
  391. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  392. end
  393. ;;
  394. delimiter ;
  395. -- ----------------------------
  396. -- Triggers structure for table purc$return
  397. -- ----------------------------
  398. DROP TRIGGER IF EXISTS `lucene_purc_return_u`;
  399. delimiter ;;
  400. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_return_u` AFTER UPDATE ON `purc$return` FOR EACH ROW begin
  401. declare v_table_name varchar(64) default 'purc$return';
  402. declare v_method_type varchar(6) default 'update';
  403. declare v_data_id int;
  404. declare v_data text default null;
  405. declare v_priority int default 0;
  406. set v_data_id=old.pr_id;
  407. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  408. end
  409. ;;
  410. delimiter ;
  411. -- ----------------------------
  412. -- Triggers structure for table purc$return
  413. -- ----------------------------
  414. DROP TRIGGER IF EXISTS `lucene_purc_return_d`;
  415. delimiter ;;
  416. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_return_d` AFTER DELETE ON `purc$return` FOR EACH ROW begin
  417. declare v_table_name varchar(64) default 'purc$return';
  418. declare v_method_type varchar(6) default 'delete';
  419. declare v_data_id int;
  420. declare v_data text default null;
  421. declare v_priority int default 0;
  422. set v_data_id=old.pr_id;
  423. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  424. end
  425. ;;
  426. delimiter ;
  427. -- ----------------------------
  428. -- Triggers structure for table purc$tender
  429. -- ----------------------------
  430. DROP TRIGGER IF EXISTS `lucene_purc_tender_i`;
  431. delimiter ;;
  432. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_tender_i` AFTER INSERT ON `purc$tender` FOR EACH ROW begin
  433. declare v_table_name varchar(64) default 'purc$tender';
  434. declare v_method_type varchar(6) default 'insert';
  435. declare v_data_id int;
  436. declare v_data text default null;
  437. declare v_priority int default 0;
  438. set v_data_id=new.pt_id;
  439. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  440. end
  441. ;;
  442. delimiter ;
  443. -- ----------------------------
  444. -- Triggers structure for table purc$tender
  445. -- ----------------------------
  446. DROP TRIGGER IF EXISTS `lucene_purc_tender_u`;
  447. delimiter ;;
  448. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_tender_u` AFTER UPDATE ON `purc$tender` FOR EACH ROW begin
  449. declare v_table_name varchar(64) default 'purc$tender';
  450. declare v_method_type varchar(6) default 'update';
  451. declare v_data_id int;
  452. declare v_data text default null;
  453. declare v_priority int default 0;
  454. set v_data_id=old.pt_id;
  455. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  456. end
  457. ;;
  458. delimiter ;
  459. -- ----------------------------
  460. -- Triggers structure for table purc$tender
  461. -- ----------------------------
  462. DROP TRIGGER IF EXISTS `lucene_purc_tender_d`;
  463. delimiter ;;
  464. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_tender_d` AFTER DELETE ON `purc$tender` FOR EACH ROW begin
  465. declare v_table_name varchar(64) default 'purc$tender';
  466. declare v_method_type varchar(6) default 'delete';
  467. declare v_data_id int;
  468. declare v_data text default null;
  469. declare v_priority int default 0;
  470. set v_data_id=old.pt_id;
  471. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  472. end
  473. ;;
  474. delimiter ;
  475. -- ----------------------------
  476. -- Triggers structure for table purc$vendors
  477. -- ----------------------------
  478. DROP TRIGGER IF EXISTS `lucene_purc_vendors_i`;
  479. delimiter ;;
  480. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_vendors_i` AFTER INSERT ON `purc$vendors` FOR EACH ROW begin
  481. declare v_table_name varchar(64) default 'purc$vendors';
  482. declare v_method_type varchar(6) default 'insert';
  483. declare v_data_id int;
  484. declare v_data text default null;
  485. declare v_priority int default 0;
  486. set v_data_id=new.ve_id;
  487. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  488. end
  489. ;;
  490. delimiter ;
  491. -- ----------------------------
  492. -- Triggers structure for table purc$vendors
  493. -- ----------------------------
  494. DROP TRIGGER IF EXISTS `lucene_purc_vendors_u`;
  495. delimiter ;;
  496. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_vendors_u` AFTER UPDATE ON `purc$vendors` FOR EACH ROW begin
  497. declare v_table_name varchar(64) default 'purc$vendors';
  498. declare v_method_type varchar(6) default 'update';
  499. declare v_data_id int;
  500. declare v_data text default null;
  501. declare v_priority int default 0;
  502. set v_data_id=old.ve_id;
  503. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  504. end
  505. ;;
  506. delimiter ;
  507. -- ----------------------------
  508. -- Triggers structure for table purc$vendors
  509. -- ----------------------------
  510. DROP TRIGGER IF EXISTS `lucene_purc_vendors_d`;
  511. delimiter ;;
  512. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_vendors_d` AFTER DELETE ON `purc$vendors` FOR EACH ROW begin
  513. declare v_table_name varchar(64) default 'purc$vendors';
  514. declare v_method_type varchar(6) default 'delete';
  515. declare v_data_id int;
  516. declare v_data text default null;
  517. declare v_priority int default 0;
  518. set v_data_id=old.ve_id;
  519. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  520. end
  521. ;;
  522. delimiter ;
  523. -- ----------------------------
  524. -- Triggers structure for table purc$vendors_cust
  525. -- ----------------------------
  526. DROP TRIGGER IF EXISTS `lucene_purc_vendors_cust_i`;
  527. delimiter ;;
  528. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_vendors_cust_i` AFTER INSERT ON `purc$vendors` FOR EACH ROW begin
  529. declare v_table_name varchar(64) default 'purc$vendors_cust';
  530. declare v_method_type varchar(6) default 'insert';
  531. declare v_data_id int;
  532. declare v_data text default null;
  533. declare v_priority int default 0;
  534. set v_data_id=new.ve_id;
  535. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  536. end
  537. ;;
  538. delimiter ;
  539. -- ----------------------------
  540. -- Triggers structure for table purc$vendors_cust
  541. -- ----------------------------
  542. DROP TRIGGER IF EXISTS `lucene_purc_vendors_cust_u`;
  543. delimiter ;;
  544. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_vendors_cust_u` AFTER UPDATE ON `purc$vendors` FOR EACH ROW begin
  545. declare v_table_name varchar(64) default 'purc$vendors_cust';
  546. declare v_method_type varchar(6) default 'update';
  547. declare v_data_id int;
  548. declare v_data text default null;
  549. declare v_priority int default 0;
  550. set v_data_id=old.ve_id;
  551. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  552. end
  553. ;;
  554. delimiter ;
  555. -- ----------------------------
  556. -- Triggers structure for table purc$vendors_cust
  557. -- ----------------------------
  558. DROP TRIGGER IF EXISTS `lucene_purc_vendors_cust_d`;
  559. delimiter ;;
  560. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_vendors_cust_d` AFTER DELETE ON `purc$vendors` FOR EACH ROW begin
  561. declare v_table_name varchar(64) default 'purc$vendors_cust';
  562. declare v_method_type varchar(6) default 'delete';
  563. declare v_data_id int;
  564. declare v_data text default null;
  565. declare v_priority int default 0;
  566. set v_data_id=old.ve_id;
  567. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  568. end
  569. ;;
  570. delimiter ;
  571. -- ----------------------------
  572. -- Triggers structure for table sale$archeck
  573. -- ----------------------------
  574. DROP TRIGGER IF EXISTS `lucene_sale_archeck_i`;
  575. delimiter ;;
  576. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_archeck_i` AFTER INSERT ON `sale$archeck` FOR EACH ROW begin
  577. declare v_table_name varchar(64) default 'sale$archeck';
  578. declare v_method_type varchar(6) default 'insert';
  579. declare v_data_id int;
  580. declare v_data text default null;
  581. declare v_priority int default 0;
  582. set v_data_id=new.sac_id;
  583. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  584. end
  585. ;;
  586. delimiter ;
  587. -- ----------------------------
  588. -- Triggers structure for table SALE$ARCHECK
  589. -- ----------------------------
  590. DROP TRIGGER IF EXISTS `lucene_sale_archeck_u`;
  591. delimiter ;;
  592. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_archeck_u` AFTER UPDATE ON `sale$archeck` FOR EACH ROW begin
  593. declare v_table_name varchar(64) default 'sale$archeck';
  594. declare v_method_type varchar(6) default 'update';
  595. declare v_data_id int;
  596. declare v_data text default null;
  597. declare v_priority int default 0;
  598. set v_data_id=old.sac_id;
  599. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  600. end
  601. ;;
  602. delimiter ;
  603. -- ----------------------------
  604. -- Triggers structure for table SALE$ARCHECK
  605. -- ----------------------------
  606. DROP TRIGGER IF EXISTS `lucene_sale_archeck_d`;
  607. delimiter ;;
  608. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_archeck_d` AFTER DELETE ON `sale$archeck` FOR EACH ROW begin
  609. declare v_table_name varchar(64) default 'sale$archeck';
  610. declare v_method_type varchar(6) default 'delete';
  611. declare v_data_id int;
  612. declare v_data text default null;
  613. declare v_priority int default 0;
  614. set v_data_id=old.sac_id;
  615. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  616. end
  617. ;;
  618. delimiter ;
  619. -- ----------------------------
  620. -- Triggers structure for table sale$quotation
  621. -- ----------------------------
  622. DROP TRIGGER IF EXISTS `lucene_sale_quotation_i`;
  623. delimiter ;;
  624. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_quotation_i` AFTER INSERT ON `sale$quotation` FOR EACH ROW begin
  625. declare v_table_name varchar(64) default 'sale$quotation';
  626. declare v_method_type varchar(6) default 'insert';
  627. declare v_data_id int;
  628. declare v_data text default null;
  629. declare v_priority int default 0;
  630. set v_data_id=new.qu_id;
  631. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  632. end
  633. ;;
  634. delimiter ;
  635. -- ----------------------------
  636. -- Triggers structure for table sale$quotation
  637. -- ----------------------------
  638. DROP TRIGGER IF EXISTS `lucene_sale_quotation_u`;
  639. delimiter ;;
  640. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_quotation_u` AFTER UPDATE ON `sale$quotation` FOR EACH ROW begin
  641. declare v_table_name varchar(64) default 'sale$quotation';
  642. declare v_method_type varchar(6) default 'update';
  643. declare v_data_id int;
  644. declare v_data text default null;
  645. declare v_priority int default 0;
  646. set v_data_id=old.qu_id;
  647. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  648. end
  649. ;;
  650. delimiter ;
  651. -- ----------------------------
  652. -- Triggers structure for table sale$quotation
  653. -- ----------------------------
  654. DROP TRIGGER IF EXISTS `lucene_sale_quotation_d`;
  655. delimiter ;;
  656. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_quotation_d` AFTER DELETE ON `sale$quotation` FOR EACH ROW begin
  657. declare v_table_name varchar(64) default 'sale$quotation';
  658. declare v_method_type varchar(6) default 'delete';
  659. declare v_data_id int;
  660. declare v_data text default null;
  661. declare v_priority int default 0;
  662. set v_data_id=old.qu_id;
  663. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  664. end
  665. ;;
  666. delimiter ;
  667. -- ----------------------------
  668. -- Triggers structure for table sale$send
  669. -- ----------------------------
  670. DROP TRIGGER IF EXISTS `lucene_sale_send_i`;
  671. delimiter ;;
  672. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_send_i` AFTER INSERT ON `sale$send` FOR EACH ROW begin
  673. declare v_table_name varchar(64) default 'sale$send';
  674. declare v_method_type varchar(6) default 'insert';
  675. declare v_data_id int;
  676. declare v_data text default null;
  677. declare v_priority int default 0;
  678. set v_data_id=new.ss_id;
  679. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  680. end
  681. ;;
  682. delimiter ;
  683. -- ----------------------------
  684. -- Triggers structure for table sale$send
  685. -- ----------------------------
  686. DROP TRIGGER IF EXISTS `lucene_sale_send_u`;
  687. delimiter ;;
  688. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_send_u` AFTER UPDATE ON `sale$send` FOR EACH ROW begin
  689. declare v_table_name varchar(64) default 'sale$send';
  690. declare v_method_type varchar(6) default 'update';
  691. declare v_data_id int;
  692. declare v_data text default null;
  693. declare v_priority int default 0;
  694. set v_data_id=old.ss_id;
  695. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  696. end
  697. ;;
  698. delimiter ;
  699. -- ----------------------------
  700. -- Triggers structure for table sale$send
  701. -- ----------------------------
  702. DROP TRIGGER IF EXISTS `lucene_sale_send_d`;
  703. delimiter ;;
  704. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_send_d` AFTER DELETE ON `sale$send` FOR EACH ROW begin
  705. declare v_table_name varchar(64) default 'sale$send';
  706. declare v_method_type varchar(6) default 'delete';
  707. declare v_data_id int;
  708. declare v_data text default null;
  709. declare v_priority int default 0;
  710. set v_data_id=old.ss_id;
  711. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  712. end
  713. ;;
  714. delimiter ;
  715. -- ----------------------------
  716. -- Triggers structure for table sale$tender
  717. -- ----------------------------
  718. DROP TRIGGER IF EXISTS `lucene_sale_tender_i`;
  719. delimiter ;;
  720. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_tender_i` AFTER INSERT ON `sale$tender` FOR EACH ROW begin
  721. declare v_table_name varchar(64) default 'sale$tender';
  722. declare v_method_type varchar(6) default 'insert';
  723. declare v_data_id int;
  724. declare v_data text default null;
  725. declare v_priority int default 0;
  726. set v_data_id=new.st_id;
  727. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  728. end
  729. ;;
  730. delimiter ;
  731. -- ----------------------------
  732. -- Triggers structure for table sale$tender
  733. -- ----------------------------
  734. DROP TRIGGER IF EXISTS `lucene_sale_tender_u`;
  735. delimiter ;;
  736. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_tender_u` AFTER UPDATE ON `sale$tender` FOR EACH ROW begin
  737. declare v_table_name varchar(64) default 'sale$tender';
  738. declare v_method_type varchar(6) default 'update';
  739. declare v_data_id int;
  740. declare v_data text default null;
  741. declare v_priority int default 0;
  742. set v_data_id=old.st_id;
  743. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  744. end
  745. ;;
  746. delimiter ;
  747. -- ----------------------------
  748. -- Triggers structure for table sale$tender
  749. -- ----------------------------
  750. DROP TRIGGER IF EXISTS `lucene_sale_tender_d`;
  751. delimiter ;;
  752. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_tender_d` AFTER DELETE ON `sale$tender` FOR EACH ROW begin
  753. declare v_table_name varchar(64) default 'sale$tender';
  754. declare v_method_type varchar(6) default 'delete';
  755. declare v_data_id int;
  756. declare v_data text default null;
  757. declare v_priority int default 0;
  758. set v_data_id=old.st_id;
  759. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  760. end
  761. ;;
  762. delimiter ;
  763. -- ----------------------------
  764. -- Triggers structure for table sale$tender_b2b
  765. -- ----------------------------
  766. DROP TRIGGER IF EXISTS `lucene_sale_tender_b2b_i`;
  767. delimiter ;;
  768. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_tender_b2b_i` AFTER INSERT ON `sale$tender` FOR EACH ROW begin
  769. declare v_table_name varchar(64) default 'sale$tender_b2b';
  770. declare v_method_type varchar(6) default 'insert';
  771. declare v_data_id int;
  772. declare v_data text default null;
  773. declare v_priority int default 0;
  774. set v_data_id=new.st_id;
  775. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  776. end
  777. ;;
  778. delimiter ;
  779. -- ----------------------------
  780. -- Triggers structure for table sale$tender_b2b
  781. -- ----------------------------
  782. DROP TRIGGER IF EXISTS `lucene_sale_tender_b2b_u`;
  783. delimiter ;;
  784. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_tender_b2b_u` AFTER UPDATE ON `sale$tender` FOR EACH ROW begin
  785. declare v_table_name varchar(64) default 'sale$tender_b2b';
  786. declare v_method_type varchar(6) default 'update';
  787. declare v_data_id int;
  788. declare v_data text default null;
  789. declare v_priority int default 0;
  790. set v_data_id=old.st_id;
  791. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  792. end
  793. ;;
  794. delimiter ;
  795. -- ----------------------------
  796. -- Triggers structure for table sale$tender_b2b
  797. -- ----------------------------
  798. DROP TRIGGER IF EXISTS `lucene_sale_tender_b2b_d`;
  799. delimiter ;;
  800. CREATE DEFINER = `root`@`%` TRIGGER `lucene_sale_tender_b2b_d` AFTER DELETE ON `sale$tender` FOR EACH ROW begin
  801. declare v_table_name varchar(64) default 'sale$tender_b2b';
  802. declare v_method_type varchar(6) default 'delete';
  803. declare v_data_id int;
  804. declare v_data text default null;
  805. declare v_priority int default 0;
  806. set v_data_id=old.st_id;
  807. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  808. end
  809. ;;
  810. delimiter ;
  811. -- ----------------------------
  812. -- Triggers structure for table purc$proofingitems
  813. -- ----------------------------
  814. DROP TRIGGER IF EXISTS `lucene_purc_proofingitems_i`;
  815. delimiter ;;
  816. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingitems_i` AFTER INSERT ON `purc$proofingitems` FOR EACH ROW begin
  817. declare v_table_name varchar(64) default 'purc$proofingitems';
  818. declare v_method_type varchar(6) default 'insert';
  819. declare v_data_id int;
  820. declare v_data text default null;
  821. declare v_priority int default 0;
  822. set v_data_id=new.ppi_id;
  823. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  824. end
  825. ;;
  826. delimiter ;
  827. -- ----------------------------
  828. -- Triggers structure for table purc$proofingitems
  829. -- ----------------------------
  830. DROP TRIGGER IF EXISTS `lucene_purc_proofingitems_u`;
  831. delimiter ;;
  832. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingitems_u` AFTER UPDATE ON `purc$proofingitems` FOR EACH ROW begin
  833. declare v_table_name varchar(64) default 'purc$proofingitems';
  834. declare v_method_type varchar(6) default 'update';
  835. declare v_data_id int;
  836. declare v_data text default null;
  837. declare v_priority int default 0;
  838. set v_data_id=old.ppi_id;
  839. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  840. end
  841. ;;
  842. delimiter ;
  843. -- ----------------------------
  844. -- Triggers structure for table purc$proofingitems
  845. -- ----------------------------
  846. DROP TRIGGER IF EXISTS `lucene_purc_proofingitems_d`;
  847. delimiter ;;
  848. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_proofingitems_d` AFTER DELETE ON `purc$proofingitems` FOR EACH ROW begin
  849. declare v_table_name varchar(64) default 'purc$proofingitems';
  850. declare v_method_type varchar(6) default 'delete';
  851. declare v_data_id int;
  852. declare v_data text default null;
  853. declare v_priority int default 0;
  854. set v_data_id=old.ppi_id;
  855. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  856. end
  857. ;;
  858. delimiter ;
  859. -- ----------------------------
  860. -- Triggers structure for table invitationrecords
  861. -- ----------------------------
  862. DROP TRIGGER IF EXISTS `lucene_invitationrecords_i`;
  863. delimiter ;;
  864. CREATE DEFINER = `root`@`%` TRIGGER `lucene_invitationrecords_i` AFTER INSERT ON `invitationrecords` FOR EACH ROW begin
  865. declare v_table_name varchar(64) default 'invitationrecords';
  866. declare v_method_type varchar(6) default 'insert';
  867. declare v_data_id int;
  868. declare v_data text default null;
  869. declare v_priority int default 0;
  870. set v_data_id=new.in_id;
  871. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  872. end
  873. ;;
  874. delimiter ;
  875. -- ----------------------------
  876. -- Triggers structure for table invitationrecords
  877. -- ----------------------------
  878. DROP TRIGGER IF EXISTS `lucene_invitationrecords_u`;
  879. delimiter ;;
  880. CREATE DEFINER = `root`@`%` TRIGGER `lucene_invitationrecords_u` AFTER UPDATE ON `invitationrecords` FOR EACH ROW begin
  881. declare v_table_name varchar(64) default 'invitationrecords';
  882. declare v_method_type varchar(6) default 'update';
  883. declare v_data_id int;
  884. declare v_data text default null;
  885. declare v_priority int default 0;
  886. set v_data_id=old.in_id;
  887. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  888. end
  889. ;;
  890. delimiter ;
  891. -- ----------------------------
  892. -- Triggers structure for table invitationrecords
  893. -- ----------------------------
  894. DROP TRIGGER IF EXISTS `lucene_invitationrecords_d`;
  895. delimiter ;;
  896. CREATE DEFINER = `root`@`%` TRIGGER `lucene_invitationrecords_d` AFTER DELETE ON `invitationrecords` FOR EACH ROW begin
  897. declare v_table_name varchar(64) default 'invitationrecords';
  898. declare v_method_type varchar(6) default 'delete';
  899. declare v_data_id int;
  900. declare v_data text default null;
  901. declare v_priority int default 0;
  902. set v_data_id=old.in_id;
  903. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  904. end
  905. ;;
  906. delimiter ;
  907. -- ----------------------------
  908. -- Triggers structure for table public$inquiryitems
  909. -- ----------------------------
  910. DROP TRIGGER IF EXISTS `lucene_public_inquiryitems_i`;
  911. delimiter ;;
  912. CREATE DEFINER = `root`@`%` TRIGGER `lucene_public_inquiryitems_i` AFTER INSERT ON `public$inquiryitems` FOR EACH ROW begin
  913. declare v_table_name varchar(64) default 'public$inquiryitems';
  914. declare v_method_type varchar(6) default 'insert';
  915. declare v_data_id int;
  916. declare v_data text default null;
  917. declare v_priority int default 0;
  918. set v_data_id=new.id_id;
  919. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  920. end
  921. ;;
  922. delimiter ;
  923. -- ----------------------------
  924. -- Triggers structure for table public$inquiryitems
  925. -- ----------------------------
  926. DROP TRIGGER IF EXISTS `lucene_public_inquiryitems_u`;
  927. delimiter ;;
  928. CREATE DEFINER = `root`@`%` TRIGGER `lucene_public_inquiryitems_u` AFTER UPDATE ON `public$inquiryitems` FOR EACH ROW begin
  929. declare v_table_name varchar(64) default 'public$inquiryitems';
  930. declare v_method_type varchar(6) default 'update';
  931. declare v_data_id int;
  932. declare v_data text default null;
  933. declare v_priority int default 0;
  934. set v_data_id=old.id_id;
  935. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  936. end
  937. ;;
  938. delimiter ;
  939. -- ----------------------------
  940. -- Triggers structure for table public$inquiryitems
  941. -- ----------------------------
  942. DROP TRIGGER IF EXISTS `lucene_public_inquiryitems_d`;
  943. delimiter ;;
  944. CREATE DEFINER = `root`@`%` TRIGGER `lucene_public_inquiryitems_d` AFTER DELETE ON `public$inquiryitems` FOR EACH ROW begin
  945. declare v_table_name varchar(64) default 'public$inquiryitems';
  946. declare v_method_type varchar(6) default 'delete';
  947. declare v_data_id int;
  948. declare v_data text default null;
  949. declare v_priority int default 0;
  950. set v_data_id=old.id_id;
  951. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  952. end
  953. ;;
  954. delimiter ;
  955. -- ----------------------------
  956. -- Triggers structure for table purc$puinquiry
  957. -- ----------------------------
  958. DROP TRIGGER IF EXISTS `lucene_purc_inquiry_i`;
  959. delimiter ;;
  960. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquiry_i` AFTER INSERT ON `purc$puinquiry` FOR EACH ROW begin
  961. declare v_table_name varchar(64) default 'purc$puinquiry';
  962. declare v_method_type varchar(6) default 'insert';
  963. declare v_data_id int;
  964. declare v_data text default null;
  965. declare v_priority int default 0;
  966. set v_data_id=new.in_id;
  967. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  968. end
  969. ;;
  970. delimiter ;
  971. -- ----------------------------
  972. -- Triggers structure for table purc$puinquiry
  973. -- ----------------------------
  974. DROP TRIGGER IF EXISTS `lucene_purc_inquiry_u`;
  975. delimiter ;;
  976. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquiry_u` AFTER UPDATE ON `purc$puinquiry` FOR EACH ROW begin
  977. declare v_table_name varchar(64) default 'purc$puinquiry';
  978. declare v_method_type varchar(6) default 'update';
  979. declare v_data_id int;
  980. declare v_data text default null;
  981. declare v_priority int default 0;
  982. set v_data_id=old.in_id;
  983. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  984. end
  985. ;;
  986. delimiter ;
  987. -- ----------------------------
  988. -- Triggers structure for table purc$puinquiry
  989. -- ----------------------------
  990. DROP TRIGGER IF EXISTS `lucene_purc_inquiry_d`;
  991. delimiter ;;
  992. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquiry_d` AFTER DELETE ON `purc$puinquiry` FOR EACH ROW begin
  993. declare v_table_name varchar(64) default 'purc$puinquiry';
  994. declare v_method_type varchar(6) default 'delete';
  995. declare v_data_id int;
  996. declare v_data text default null;
  997. declare v_priority int default 0;
  998. set v_data_id=old.in_id;
  999. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1000. end
  1001. ;;
  1002. delimiter ;
  1003. -- ----------------------------
  1004. -- Triggers structure for table purc$puinquiryitems
  1005. -- ----------------------------
  1006. DROP TRIGGER IF EXISTS `lucene_purc_puinquiryitems_i`;
  1007. delimiter ;;
  1008. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_puinquiryitems_i` AFTER INSERT ON `purc$puinquiryitems` FOR EACH ROW begin
  1009. declare v_table_name varchar(64) default 'purc$puinquiryitems';
  1010. declare v_method_type varchar(6) default 'insert';
  1011. declare v_data_id int;
  1012. declare v_data text default null;
  1013. declare v_priority int default 0;
  1014. set v_data_id=new.id_id;
  1015. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1016. end
  1017. ;;
  1018. delimiter ;
  1019. -- ----------------------------
  1020. -- Triggers structure for table purc$puinquiryitems
  1021. -- ----------------------------
  1022. DROP TRIGGER IF EXISTS `lucene_purc_puinquiryitems_u`;
  1023. delimiter ;;
  1024. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_puinquiryitems_u` AFTER UPDATE ON `purc$puinquiryitems` FOR EACH ROW begin
  1025. declare v_table_name varchar(64) default 'purc$puinquiryitems';
  1026. declare v_method_type varchar(6) default 'update';
  1027. declare v_data_id int;
  1028. declare v_data text default null;
  1029. declare v_priority int default 0;
  1030. set v_data_id=old.id_id;
  1031. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1032. end
  1033. ;;
  1034. delimiter ;
  1035. -- ----------------------------
  1036. -- Triggers structure for table purc$puinquiryitems
  1037. -- ----------------------------
  1038. DROP TRIGGER IF EXISTS `lucene_purc_puinquiryitems_d`;
  1039. delimiter ;;
  1040. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_puinquiryitems_d` AFTER DELETE ON `purc$puinquiryitems` FOR EACH ROW begin
  1041. declare v_table_name varchar(64) default 'purc$puinquiryitems';
  1042. declare v_method_type varchar(6) default 'delete';
  1043. declare v_data_id int;
  1044. declare v_data text default null;
  1045. declare v_priority int default 0;
  1046. set v_data_id=old.id_id;
  1047. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1048. end
  1049. ;;
  1050. delimiter ;
  1051. -- ----------------------------
  1052. -- Triggers structure for table purc$inquiryitems
  1053. -- ----------------------------
  1054. DROP TRIGGER IF EXISTS `lucene_purc_inquiryitems_i`;
  1055. delimiter ;;
  1056. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquiryitems_i` AFTER INSERT ON `purc$inquiryitems` FOR EACH ROW begin
  1057. declare v_table_name varchar(64) default 'purc$inquiryitems';
  1058. declare v_method_type varchar(6) default 'insert';
  1059. declare v_data_id int;
  1060. declare v_data text default null;
  1061. declare v_priority int default 0;
  1062. set v_data_id=new.id_id;
  1063. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1064. end
  1065. ;;
  1066. delimiter ;
  1067. -- ----------------------------
  1068. -- Triggers structure for table purc$inquiryitems
  1069. -- ----------------------------
  1070. DROP TRIGGER IF EXISTS `lucene_purc_inquiryitems_u`;
  1071. delimiter ;;
  1072. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquiryitems_u` AFTER UPDATE ON `purc$inquiryitems` FOR EACH ROW begin
  1073. declare v_table_name varchar(64) default 'purc$inquiryitems';
  1074. declare v_method_type varchar(6) default 'update';
  1075. declare v_data_id int;
  1076. declare v_data text default null;
  1077. declare v_priority int default 0;
  1078. set v_data_id=old.id_id;
  1079. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1080. end
  1081. ;;
  1082. delimiter ;
  1083. -- ----------------------------
  1084. -- Triggers structure for table purc$inquiryitems
  1085. -- ----------------------------
  1086. DROP TRIGGER IF EXISTS `lucene_purc_inquiryitems_d`;
  1087. delimiter ;;
  1088. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquiryitems_d` AFTER DELETE ON `purc$inquiryitems` FOR EACH ROW begin
  1089. declare v_table_name varchar(64) default 'purc$inquiryitems';
  1090. declare v_method_type varchar(6) default 'delete';
  1091. declare v_data_id int;
  1092. declare v_data text default null;
  1093. declare v_priority int default 0;
  1094. set v_data_id=old.id_id;
  1095. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1096. end
  1097. ;;
  1098. delimiter ;
  1099. -- ----------------------------
  1100. -- Triggers structure for table purc$inquirymould
  1101. -- ----------------------------
  1102. DROP TRIGGER IF EXISTS `lucene_purc_inquirymould_i`;
  1103. delimiter ;;
  1104. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquirymould_i` AFTER INSERT ON `purc$inquirymould` FOR EACH ROW begin
  1105. declare v_table_name varchar(64) default 'purc$inquirymould';
  1106. declare v_method_type varchar(6) default 'insert';
  1107. declare v_data_id int;
  1108. declare v_data text default null;
  1109. declare v_priority int default 0;
  1110. set v_data_id=new.im_id;
  1111. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1112. end
  1113. ;;
  1114. delimiter ;
  1115. -- ----------------------------
  1116. -- Triggers structure for table purc$inquirymould
  1117. -- ----------------------------
  1118. DROP TRIGGER IF EXISTS `lucene_purc_inquirymould_u`;
  1119. delimiter ;;
  1120. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquirymould_u` AFTER UPDATE ON `purc$inquirymould` FOR EACH ROW begin
  1121. declare v_table_name varchar(64) default 'purc$inquirymould';
  1122. declare v_method_type varchar(6) default 'update';
  1123. declare v_data_id int;
  1124. declare v_data text default null;
  1125. declare v_priority int default 0;
  1126. set v_data_id=old.im_id;
  1127. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1128. end
  1129. ;;
  1130. delimiter ;
  1131. -- ----------------------------
  1132. -- Triggers structure for table purc$inquirymould
  1133. -- ----------------------------
  1134. DROP TRIGGER IF EXISTS `lucene_purc_inquirymould_d`;
  1135. delimiter ;;
  1136. CREATE DEFINER = `root`@`%` TRIGGER `lucene_purc_inquirymould_d` AFTER DELETE ON `purc$inquirymould` FOR EACH ROW begin
  1137. declare v_table_name varchar(64) default 'purc$inquirymould';
  1138. declare v_method_type varchar(6) default 'delete';
  1139. declare v_data_id int;
  1140. declare v_data text default null;
  1141. declare v_priority int default 0;
  1142. set v_data_id=old.im_id;
  1143. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1144. end
  1145. ;;
  1146. delimiter ;
  1147. -- ----------------------------
  1148. -- Triggers structure for table invitationrecords
  1149. -- ----------------------------
  1150. DROP TRIGGER IF EXISTS `lucene_invitationrecords_i`;
  1151. delimiter ;;
  1152. CREATE DEFINER = `root`@`%` TRIGGER `lucene_invitationrecords_i` AFTER INSERT ON `invitationrecords` FOR EACH ROW begin
  1153. declare v_table_name varchar(64) default 'invitationrecords';
  1154. declare v_method_type varchar(6) default 'insert';
  1155. declare v_data_id int;
  1156. declare v_data text default null;
  1157. declare v_priority int default 0;
  1158. set v_data_id=new.in_id;
  1159. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1160. end
  1161. ;;
  1162. delimiter ;
  1163. -- ----------------------------
  1164. -- Triggers structure for table invitationrecords
  1165. -- ----------------------------
  1166. DROP TRIGGER IF EXISTS `lucene_invitationrecords_u`;
  1167. delimiter ;;
  1168. CREATE DEFINER = `root`@`%` TRIGGER `lucene_invitationrecords_u` AFTER UPDATE ON `invitationrecords` FOR EACH ROW begin
  1169. declare v_table_name varchar(64) default 'invitationrecords';
  1170. declare v_method_type varchar(6) default 'update';
  1171. declare v_data_id int;
  1172. declare v_data text default null;
  1173. declare v_priority int default 0;
  1174. set v_data_id=old.in_id;
  1175. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1176. end
  1177. ;;
  1178. delimiter ;
  1179. -- ----------------------------
  1180. -- Triggers structure for table invitationrecords
  1181. -- ----------------------------
  1182. DROP TRIGGER IF EXISTS `lucene_invitationrecords_d`;
  1183. delimiter ;;
  1184. CREATE DEFINER = `root`@`%` TRIGGER `lucene_invitationrecords_d` AFTER DELETE ON `invitationrecords` FOR EACH ROW begin
  1185. declare v_table_name varchar(64) default 'invitationrecords';
  1186. declare v_method_type varchar(6) default 'delete';
  1187. declare v_data_id int;
  1188. declare v_data text default null;
  1189. declare v_priority int default 0;
  1190. set v_data_id=old.in_id;
  1191. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1192. end
  1193. ;;
  1194. delimiter ;
  1195. -- ---hyy---------------------
  1196. -- ----------------------------
  1197. -- Triggers structure for table sale$tenderquestion
  1198. -- ----------------------------
  1199. DROP TRIGGER IF EXISTS `lucene_tenderquestion_i`;
  1200. delimiter ;;
  1201. CREATE DEFINER = `root`@`%` TRIGGER `lucene_tenderquestion_i` AFTER INSERT ON `sale$tenderquestion` FOR EACH ROW
  1202. begin
  1203. declare v_table_name varchar(64) default 'sale$tenderquestion';
  1204. declare v_method_type varchar(6) default 'delete';
  1205. declare v_data_id int;
  1206. declare v_data text default null;
  1207. declare v_priority int default 1;
  1208. set v_data_id=new.stq_id;
  1209. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1210. end
  1211. ;;
  1212. delimiter ;
  1213. -- ----------------------------
  1214. -- Triggers structure for table sale$tenderquestion
  1215. -- ----------------------------
  1216. DROP TRIGGER IF EXISTS `lucene_tenderquestion_u`;
  1217. delimiter ;;
  1218. CREATE DEFINER = `root`@`%` TRIGGER `lucene_tenderquestion_u` AFTER UPDATE ON `sale$tenderquestion` FOR EACH ROW
  1219. begin
  1220. declare v_table_name varchar(64) default 'sale$tenderquestion';
  1221. declare v_method_type varchar(6) default 'UPDATE';
  1222. declare v_data_id int;
  1223. declare v_data text default null;
  1224. declare v_priority int default 1;
  1225. set v_data_id=old.stq_id;
  1226. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1227. end
  1228. ;;
  1229. delimiter ;
  1230. -- ----------------------------
  1231. -- Triggers structure for table sale$tenderquestion
  1232. -- ----------------------------
  1233. DROP TRIGGER IF EXISTS `lucene_tenderquestion_d`;
  1234. delimiter ;;
  1235. CREATE DEFINER = `root`@`%` TRIGGER `lucene_tenderquestion_d` AFTER DELETE ON `sale$tenderquestion` FOR EACH ROW
  1236. begin
  1237. declare v_table_name varchar(64) default 'sale$tenderquestion';
  1238. declare v_method_type varchar(6) default 'DELETE';
  1239. declare v_data_id int;
  1240. declare v_data text default null;
  1241. declare v_priority int default 1;
  1242. set v_data_id=old.stq_id;
  1243. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1244. end
  1245. ;;
  1246. delimiter ;
  1247. -- ----------------------------
  1248. -- Triggers structure for table sale$tenderquestion
  1249. -- ----------------------------
  1250. DROP TRIGGER IF EXISTS `lucene_tenderquestion_d`;
  1251. delimiter ;;
  1252. CREATE DEFINER = `root`@`%` TRIGGER `lucene_tenderquestion_d` AFTER DELETE ON `sale$tenderquestion` FOR EACH ROW
  1253. begin
  1254. declare v_table_name varchar(64) default 'sale$tenderquestion';
  1255. declare v_method_type varchar(6) default 'DELETE';
  1256. declare v_data_id int;
  1257. declare v_data text default null;
  1258. declare v_priority int default 1;
  1259. set v_data_id=old.stq_id;
  1260. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1261. end
  1262. ;;
  1263. delimiter ;
  1264. -- ----------------------------
  1265. -- Triggers structure for table PURC$DEPUTYORDERS
  1266. -- ----------------------------
  1267. DROP TRIGGER IF EXISTS `lucene_DEPUTYORDERS_i`;
  1268. delimiter ;;
  1269. CREATE DEFINER = `root`@`%` TRIGGER `lucene_DEPUTYORDERS_i` AFTER INSERT ON `PURC$DEPUTYORDERS` FOR EACH ROW
  1270. begin
  1271. declare v_table_name varchar(64) default 'purc$deputyorders';
  1272. declare v_method_type varchar(6) default 'INSERT';
  1273. declare v_data_id int;
  1274. declare v_data text default null;
  1275. declare v_priority int default 1;
  1276. set v_data_id=new.deo_id;
  1277. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1278. end
  1279. ;;
  1280. delimiter ;
  1281. -- ----------------------------
  1282. -- Triggers structure for table PURC$DEPUTYORDERS
  1283. -- ----------------------------
  1284. DROP TRIGGER IF EXISTS `lucene_DEPUTYORDERS_u`;
  1285. delimiter ;;
  1286. CREATE DEFINER = `root`@`%` TRIGGER `lucene_DEPUTYORDERS_u` AFTER update ON `PURC$DEPUTYORDERS` FOR EACH ROW
  1287. begin
  1288. declare v_table_name varchar(64) default 'purc$deputyorders';
  1289. declare v_method_type varchar(6) default 'update';
  1290. declare v_data_id int;
  1291. declare v_data text default null;
  1292. declare v_priority int default 1;
  1293. set v_data_id=old.deo_id;
  1294. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1295. end
  1296. ;;
  1297. delimiter ;
  1298. -- ----------------------------
  1299. -- Triggers structure for table PURC$DEPUTYORDERS
  1300. -- ----------------------------
  1301. DROP TRIGGER IF EXISTS `lucene_DEPUTYORDERS_d`;
  1302. delimiter ;;
  1303. CREATE DEFINER = `root`@`%` TRIGGER `lucene_DEPUTYORDERS_d` AFTER DELETE ON `PURC$DEPUTYORDERS` FOR EACH ROW
  1304. begin
  1305. declare v_table_name varchar(64) default 'purc$deputyorders';
  1306. declare v_method_type varchar(6) default 'DELETE';
  1307. declare v_data_id int;
  1308. declare v_data text default null;
  1309. declare v_priority int default 1;
  1310. set v_data_id=old.deo_id;
  1311. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1312. end
  1313. ;;
  1314. delimiter ;
  1315. -- ----------------------------
  1316. -- Triggers structure for table purc$puinquiry
  1317. -- ----------------------------
  1318. DROP TRIGGER IF EXISTS `lucene_puinquiry_d`;
  1319. delimiter ;;
  1320. CREATE DEFINER = `root`@`%` TRIGGER `lucene_puinquiry_d` AFTER DELETE ON `purc$puinquiry` FOR EACH ROW
  1321. begin
  1322. declare v_table_name varchar(64) default 'purc$puinquiry';
  1323. declare v_method_type varchar(6) default 'DELETE';
  1324. declare v_data_id int;
  1325. declare v_data text default null;
  1326. declare v_priority int default 1;
  1327. set v_data_id=old.in_id;
  1328. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1329. end
  1330. ;;
  1331. delimiter ;
  1332. -- ----------------------------
  1333. -- Triggers structure for table purc$puinquiry
  1334. -- ----------------------------
  1335. DROP TRIGGER IF EXISTS `lucene_puinquiry_u`;
  1336. delimiter ;;
  1337. CREATE DEFINER = `root`@`%` TRIGGER `lucene_puinquiry_u` AFTER update ON `purc$puinquiry` FOR EACH ROW
  1338. begin
  1339. declare v_table_name varchar(64) default 'purc$puinquiry';
  1340. declare v_method_type varchar(6) default 'update';
  1341. declare v_data_id int;
  1342. declare v_data text default null;
  1343. declare v_priority int default 1;
  1344. set v_data_id=old.in_id;
  1345. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1346. end
  1347. ;;
  1348. delimiter ;
  1349. -- ----------------------------
  1350. -- Triggers structure for table purc$puinquiry
  1351. -- ----------------------------
  1352. DROP TRIGGER IF EXISTS `lucene_puinquiry_i`;
  1353. delimiter ;;
  1354. CREATE DEFINER = `root`@`%` TRIGGER `lucene_puinquiry_i` AFTER INSERT ON `purc$puinquiry` FOR EACH ROW
  1355. begin
  1356. declare v_table_name varchar(64) default 'purc$puinquiry';
  1357. declare v_method_type varchar(6) default 'INSERT';
  1358. declare v_data_id int;
  1359. declare v_data text default null;
  1360. declare v_priority int default 1;
  1361. set v_data_id=new.in_id;
  1362. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1363. end
  1364. ;;
  1365. delimiter ;
  1366. -- ----------------------------
  1367. -- Triggers structure for table MAKE$ACCEPT
  1368. -- ----------------------------
  1369. DROP TRIGGER IF EXISTS `lucene_MAKE_ACCEPT_i`;
  1370. delimiter ;;
  1371. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_ACCEPT_i` AFTER INSERT ON `MAKE$ACCEPT` FOR EACH ROW
  1372. begin
  1373. declare v_table_name varchar(64) default 'MAKE$ACCEPT';
  1374. declare v_method_type varchar(6) default 'INSERT';
  1375. declare v_data_id int;
  1376. declare v_data text default null;
  1377. declare v_priority int default 1;
  1378. set v_data_id=new.ma_id;
  1379. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1380. end
  1381. ;;
  1382. delimiter ;
  1383. -- ----------------------------
  1384. -- Triggers structure for table MAKE$ACCEPT
  1385. -- ----------------------------
  1386. DROP TRIGGER IF EXISTS `lucene_MAKE_ACCEPT_u`;
  1387. delimiter ;;
  1388. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_ACCEPT_u` AFTER UPDATE ON `MAKE$ACCEPT` FOR EACH ROW
  1389. begin
  1390. declare v_table_name varchar(64) default 'MAKE$ACCEPT';
  1391. declare v_method_type varchar(6) default 'UPDATE';
  1392. declare v_data_id int;
  1393. declare v_data text default null;
  1394. declare v_priority int default 1;
  1395. set v_data_id=old.ma_id;
  1396. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1397. end
  1398. ;;
  1399. delimiter ;
  1400. -- ----------------------------
  1401. -- Triggers structure for table MAKE$ACCEPT
  1402. -- ----------------------------
  1403. DROP TRIGGER IF EXISTS `lucene_MAKE_ACCEPT_d`;
  1404. delimiter ;;
  1405. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_ACCEPT_d` AFTER DELETE ON `MAKE$ACCEPT` FOR EACH ROW
  1406. begin
  1407. declare v_table_name varchar(64) default 'MAKE$ACCEPT';
  1408. declare v_method_type varchar(6) default 'DELETE';
  1409. declare v_data_id int;
  1410. declare v_data text default null;
  1411. declare v_priority int default 1;
  1412. set v_data_id=old.ma_id;
  1413. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1414. end
  1415. ;;
  1416. delimiter ;
  1417. -- ----------------------------
  1418. -- Triggers structure for table MAKE$ORDERS
  1419. -- ----------------------------
  1420. DROP TRIGGER IF EXISTS `lucene_MAKE_ORDERS_d`;
  1421. delimiter ;;
  1422. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_ORDERS_d` AFTER DELETE ON `MAKE$ORDERS` FOR EACH ROW
  1423. begin
  1424. declare v_table_name varchar(64) default 'MAKE$ORDERS';
  1425. declare v_method_type varchar(6) default 'DELETE';
  1426. declare v_data_id int;
  1427. declare v_data text default null;
  1428. declare v_priority int default 1;
  1429. set v_data_id=old.ma_id;
  1430. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1431. end
  1432. ;;
  1433. delimiter ;
  1434. -- ----------------------------
  1435. -- Triggers structure for table MAKE$ORDERS
  1436. -- ----------------------------
  1437. DROP TRIGGER IF EXISTS `lucene_MAKE_ORDERS_u`;
  1438. delimiter ;;
  1439. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_ORDERS_u` AFTER UPDATE ON `MAKE$ORDERS` FOR EACH ROW
  1440. begin
  1441. declare v_table_name varchar(64) default 'MAKE$ORDERS';
  1442. declare v_method_type varchar(6) default 'UPDATE';
  1443. declare v_data_id int;
  1444. declare v_data text default null;
  1445. declare v_priority int default 1;
  1446. set v_data_id=old.ma_id;
  1447. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1448. end
  1449. ;;
  1450. delimiter ;
  1451. -- ----------------------------
  1452. -- Triggers structure for table MAKE$ORDERS
  1453. -- ----------------------------
  1454. DROP TRIGGER IF EXISTS `lucene_MAKE_ORDERS_i`;
  1455. delimiter ;;
  1456. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_ORDERS_i` AFTER INSERT ON `MAKE$ORDERS` FOR EACH ROW
  1457. begin
  1458. declare v_table_name varchar(64) default 'MAKE$ORDERS';
  1459. declare v_method_type varchar(6) default 'INSERT';
  1460. declare v_data_id int;
  1461. declare v_data text default null;
  1462. declare v_priority int default 1;
  1463. set v_data_id=new.ma_id;
  1464. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1465. end
  1466. ;;
  1467. delimiter ;
  1468. -- ----------------------------
  1469. -- Triggers structure for table MAKE$RETURN
  1470. -- ----------------------------
  1471. DROP TRIGGER IF EXISTS `lucene_MAKE_RETURN_i`;
  1472. delimiter ;;
  1473. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_RETURN_i` AFTER INSERT ON `MAKE$RETURN` FOR EACH ROW
  1474. begin
  1475. declare v_table_name varchar(64) default 'MAKE$RETURN';
  1476. declare v_method_type varchar(6) default 'INSERT';
  1477. declare v_data_id int;
  1478. declare v_data text default null;
  1479. declare v_priority int default 1;
  1480. set v_data_id=new.mr_id;
  1481. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1482. end
  1483. ;;
  1484. delimiter ;
  1485. -- ----------------------------
  1486. -- Triggers structure for table MAKE$RETURN
  1487. -- ----------------------------
  1488. DROP TRIGGER IF EXISTS `lucene_MAKE_RETURN_u`;
  1489. delimiter ;;
  1490. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_RETURN_u` AFTER UPDATE ON `MAKE$RETURN` FOR EACH ROW
  1491. begin
  1492. declare v_table_name varchar(64) default 'MAKE$RETURN';
  1493. declare v_method_type varchar(6) default 'UPDATE';
  1494. declare v_data_id int;
  1495. declare v_data text default null;
  1496. declare v_priority int default 1;
  1497. set v_data_id=old.mr_id;
  1498. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1499. end
  1500. ;;
  1501. delimiter ;
  1502. -- ----------------------------
  1503. -- Triggers structure for table MAKE$RETURN
  1504. -- ----------------------------
  1505. DROP TRIGGER IF EXISTS `lucene_MAKE_RETURN_d`;
  1506. delimiter ;;
  1507. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_RETURN_d` AFTER DELETE ON `MAKE$RETURN` FOR EACH ROW
  1508. begin
  1509. declare v_table_name varchar(64) default 'MAKE$RETURN';
  1510. declare v_method_type varchar(6) default 'DELETE';
  1511. declare v_data_id int;
  1512. declare v_data text default null;
  1513. declare v_priority int default 1;
  1514. set v_data_id=old.mr_id;
  1515. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1516. end
  1517. ;;
  1518. delimiter ;
  1519. -- ----------------------------
  1520. -- Triggers structure for table MAKE$CHANGEITEMS
  1521. -- ----------------------------
  1522. DROP TRIGGER IF EXISTS `lucene_MAKE_CHANGEITEMS_d`;
  1523. delimiter ;;
  1524. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_CHANGEITEMS_d` AFTER DELETE ON `MAKE$CHANGEITEMS` FOR EACH ROW
  1525. begin
  1526. declare v_table_name varchar(64) default 'MAKE$CHANGEITEMS';
  1527. declare v_method_type varchar(6) default 'DELETE';
  1528. declare v_data_id int;
  1529. declare v_data text default null;
  1530. declare v_priority int default 1;
  1531. set v_data_id=old.mcd_id;
  1532. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1533. end
  1534. ;;
  1535. delimiter ;
  1536. -- ----------------------------
  1537. -- Triggers structure for table MAKE$CHANGEITEMS
  1538. -- ----------------------------
  1539. DROP TRIGGER IF EXISTS `lucene_MAKE_CHANGEITEMS_u`;
  1540. delimiter ;;
  1541. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_CHANGEITEMS_u` AFTER UPDATE ON `MAKE$CHANGEITEMS` FOR EACH ROW
  1542. begin
  1543. declare v_table_name varchar(64) default 'MAKE$CHANGEITEMS';
  1544. declare v_method_type varchar(6) default 'UPDATE';
  1545. declare v_data_id int;
  1546. declare v_data text default null;
  1547. declare v_priority int default 1;
  1548. set v_data_id=old.mcd_id;
  1549. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1550. end
  1551. ;;
  1552. delimiter ;
  1553. -- ----------------------------
  1554. -- Triggers structure for table MAKE$CHANGEITEMS
  1555. -- ----------------------------
  1556. DROP TRIGGER IF EXISTS `lucene_MAKE_CHANGEITEMS_i`;
  1557. delimiter ;;
  1558. CREATE DEFINER = `root`@`%` TRIGGER `lucene_MAKE_CHANGEITEMS_i` AFTER INSERT ON `MAKE$CHANGEITEMS` FOR EACH ROW
  1559. begin
  1560. declare v_table_name varchar(64) default 'MAKE$CHANGEITEMS';
  1561. declare v_method_type varchar(6) default 'INSERT';
  1562. declare v_data_id int;
  1563. declare v_data text default null;
  1564. declare v_priority int default 1;
  1565. set v_data_id=new.mcd_id;
  1566. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1567. end
  1568. ;;
  1569. delimiter ;
  1570. -- ----------------------------
  1571. -- Triggers structure for table PURC$PAGINGRELEASEDETAIL
  1572. -- ----------------------------
  1573. DROP TRIGGER IF EXISTS `lucene_PAGINGRELEASEDETAIL_i`;
  1574. delimiter ;;
  1575. CREATE DEFINER = `root`@`%` TRIGGER `lucene_PAGINGRELEASEDETAIL_i` AFTER INSERT ON `PURC$PAGINGRELEASEDETAIL` FOR EACH ROW
  1576. begin
  1577. declare v_table_name varchar(64) default 'PURC$PAGINGRELEASEDETAIL';
  1578. declare v_method_type varchar(6) default 'INSERT';
  1579. declare v_data_id int;
  1580. declare v_data text default null;
  1581. declare v_priority int default 1;
  1582. set v_data_id=new.prd_id;
  1583. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1584. end
  1585. ;;
  1586. delimiter ;
  1587. -- ----------------------------
  1588. -- Triggers structure for table PURC$PAGINGRELEASEDETAIL
  1589. -- ----------------------------
  1590. DROP TRIGGER IF EXISTS `lucene_PAGINGRELEASEDETAIL_u`;
  1591. delimiter ;;
  1592. CREATE DEFINER = `root`@`%` TRIGGER `lucene_PAGINGRELEASEDETAIL_u` AFTER UPDATE ON `PURC$PAGINGRELEASEDETAIL` FOR EACH ROW
  1593. begin
  1594. declare v_table_name varchar(64) default 'PURC$PAGINGRELEASEDETAIL';
  1595. declare v_method_type varchar(6) default 'UPDATE';
  1596. declare v_data_id int;
  1597. declare v_data text default null;
  1598. declare v_priority int default 1;
  1599. set v_data_id=old.prd_id;
  1600. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1601. end
  1602. ;;
  1603. delimiter ;
  1604. -- ----------------------------
  1605. -- Triggers structure for table PURC$PAGINGRELEASEDETAIL
  1606. -- ----------------------------
  1607. DROP TRIGGER IF EXISTS `lucene_PAGINGRELEASEDETAIL_d`;
  1608. delimiter ;;
  1609. CREATE DEFINER = `root`@`%` TRIGGER `lucene_PAGINGRELEASEDETAIL_d` AFTER DELETE ON `PURC$PAGINGRELEASEDETAIL` FOR EACH ROW
  1610. begin
  1611. declare v_table_name varchar(64) default 'PURC$PAGINGRELEASEDETAIL';
  1612. declare v_method_type varchar(6) default 'DELETE';
  1613. declare v_data_id int;
  1614. declare v_data text default null;
  1615. declare v_priority int default 1;
  1616. set v_data_id=old.prd_id;
  1617. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1618. end
  1619. ;;
  1620. delimiter ;
  1621. -- ----------------------------
  1622. -- Triggers structure for table PRODUCT$USERS
  1623. -- ----------------------------
  1624. DROP TRIGGER IF EXISTS `lucene_USERS_d`;
  1625. delimiter ;;
  1626. CREATE DEFINER = `root`@`%` TRIGGER `lucene_USERS_d` AFTER DELETE ON `PRODUCT$USERS` FOR EACH ROW
  1627. begin
  1628. declare v_table_name varchar(64) default 'PRODUCT$USERS';
  1629. declare v_method_type varchar(6) default 'DELETE';
  1630. declare v_data_id int;
  1631. declare v_data text default null;
  1632. declare v_priority int default 1;
  1633. set v_data_id=old.pu_id;
  1634. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1635. end
  1636. ;;
  1637. delimiter ;
  1638. -- ----------------------------
  1639. -- Triggers structure for table PRODUCT$USERS
  1640. -- ----------------------------
  1641. DROP TRIGGER IF EXISTS `lucene_USERS_u`;
  1642. delimiter ;;
  1643. CREATE DEFINER = `root`@`%` TRIGGER `lucene_USERS_u` AFTER UPDATE ON `PRODUCT$USERS` FOR EACH ROW
  1644. begin
  1645. declare v_table_name varchar(64) default 'PRODUCT$USERS';
  1646. declare v_method_type varchar(6) default 'UPDATE';
  1647. declare v_data_id int;
  1648. declare v_data text default null;
  1649. declare v_priority int default 1;
  1650. set v_data_id=old.pu_id;
  1651. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1652. end
  1653. ;;
  1654. delimiter ;
  1655. -- ----------------------------
  1656. -- Triggers structure for table PRODUCT$USERS
  1657. -- ----------------------------
  1658. DROP TRIGGER IF EXISTS `lucene_USERS_i`;
  1659. delimiter ;;
  1660. CREATE DEFINER = `root`@`%` TRIGGER `lucene_USERS_i` AFTER INSERT ON `PRODUCT$USERS` FOR EACH ROW
  1661. begin
  1662. declare v_table_name varchar(64) default 'PRODUCT$USERS';
  1663. declare v_method_type varchar(6) default 'INSERT';
  1664. declare v_data_id int;
  1665. declare v_data text default null;
  1666. declare v_priority int default 1;
  1667. set v_data_id=new.pu_id;
  1668. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1669. end
  1670. ;;
  1671. delimiter ;
  1672. -- ----------------------------
  1673. -- Triggers structure for table products
  1674. -- ----------------------------
  1675. DROP TRIGGER IF EXISTS `lucene_products_i`;
  1676. delimiter ;;
  1677. CREATE DEFINER = `root`@`%` TRIGGER `lucene_products_i` AFTER INSERT ON `products` FOR EACH ROW
  1678. begin
  1679. declare v_table_name varchar(64) default 'v$products';
  1680. declare v_method_type varchar(6) default 'INSERT';
  1681. declare v_data_id int;
  1682. declare v_data text default null;
  1683. declare v_priority int default 1;
  1684. set v_data_id=new.pr_id;
  1685. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1686. end
  1687. ;;
  1688. delimiter ;
  1689. -- ----------------------------
  1690. -- Triggers structure for table products
  1691. -- ----------------------------
  1692. DROP TRIGGER IF EXISTS `lucene_products_u`;
  1693. delimiter ;;
  1694. CREATE DEFINER = `root`@`%` TRIGGER `lucene_products_u` AFTER UPDATE ON `products` FOR EACH ROW
  1695. begin
  1696. declare v_table_name varchar(64) default 'v$products';
  1697. declare v_method_type varchar(6) default 'UPDATE';
  1698. declare v_data_id int;
  1699. declare v_data text default null;
  1700. declare v_priority int default 1;
  1701. set v_data_id=old.pr_id;
  1702. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1703. end
  1704. ;;
  1705. delimiter ;
  1706. -- ----------------------------
  1707. -- Triggers structure for table products
  1708. -- ----------------------------
  1709. DROP TRIGGER IF EXISTS `lucene_products_d`;
  1710. delimiter ;;
  1711. CREATE DEFINER = `root`@`%` TRIGGER `lucene_products_d` AFTER DELETE ON `products` FOR EACH ROW
  1712. begin
  1713. declare v_table_name varchar(64) default 'v$products';
  1714. declare v_method_type varchar(6) default 'DELETE';
  1715. declare v_data_id int;
  1716. declare v_data text default null;
  1717. declare v_priority int default 1;
  1718. set v_data_id=old.pr_id;
  1719. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1720. end
  1721. ;;
  1722. delimiter ;
  1723. -- ----------------------------
  1724. -- Triggers structure for table PURC$ACCEPT
  1725. -- ----------------------------
  1726. DROP TRIGGER IF EXISTS `lucene_ACCEPT_u`;
  1727. delimiter ;;
  1728. CREATE DEFINER = `root`@`%` TRIGGER `lucene_ACCEPT_u` AFTER UPDATE ON `PURC$ACCEPT` FOR EACH ROW
  1729. begin
  1730. declare v_table_name varchar(64) default 'PURC$ACCEPT';
  1731. declare v_method_type varchar(6) default 'UPDATE';
  1732. declare v_data_id int;
  1733. declare v_data text default null;
  1734. declare v_priority int default 1;
  1735. set v_data_id=old.pa_id;
  1736. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1737. end
  1738. ;;
  1739. delimiter ;
  1740. -- ----------------------------
  1741. -- Triggers structure for table PURC$ACCEPT
  1742. -- ----------------------------
  1743. DROP TRIGGER IF EXISTS `lucene_ACCEPT_d`;
  1744. delimiter ;;
  1745. CREATE DEFINER = `root`@`%` TRIGGER `lucene_ACCEPT_d` AFTER DELETE ON `PURC$ACCEPT` FOR EACH ROW
  1746. begin
  1747. declare v_table_name varchar(64) default 'PURC$ACCEPT';
  1748. declare v_method_type varchar(6) default 'DELETE';
  1749. declare v_data_id int;
  1750. declare v_data text default null;
  1751. declare v_priority int default 1;
  1752. set v_data_id=old.pa_id;
  1753. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1754. end
  1755. ;;
  1756. delimiter ;
  1757. -- ----------------------------
  1758. -- Triggers structure for table PURC$ACCEPT
  1759. -- ----------------------------
  1760. DROP TRIGGER IF EXISTS `lucene_ACCEPT_i`;
  1761. delimiter ;;
  1762. CREATE DEFINER = `root`@`%` TRIGGER `lucene_ACCEPT_i` AFTER INSERT ON `PURC$ACCEPT` FOR EACH ROW
  1763. begin
  1764. declare v_table_name varchar(64) default 'PURC$ACCEPT';
  1765. declare v_method_type varchar(6) default 'INSERT';
  1766. declare v_data_id int;
  1767. declare v_data text default null;
  1768. declare v_priority int default 1;
  1769. set v_data_id=new.pa_id;
  1770. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1771. end
  1772. ;;
  1773. delimiter ;
  1774. -- ----------------------------
  1775. -- Triggers structure for table PURC$APBILL
  1776. -- ----------------------------
  1777. DROP TRIGGER IF EXISTS `lucene_APBILL_i`;
  1778. delimiter ;;
  1779. CREATE DEFINER = `root`@`%` TRIGGER `lucene_APBILL_i` AFTER INSERT ON `PURC$APBILL` FOR EACH ROW
  1780. begin
  1781. declare v_table_name varchar(64) default 'PURC$APBILL';
  1782. declare v_method_type varchar(6) default 'INSERT';
  1783. declare v_data_id int;
  1784. declare v_data text default null;
  1785. declare v_priority int default 1;
  1786. set v_data_id=new.pab_id;
  1787. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1788. end
  1789. ;;
  1790. delimiter ;
  1791. -- ----------------------------
  1792. -- Triggers structure for table PURC$APBILL
  1793. -- ----------------------------
  1794. DROP TRIGGER IF EXISTS `lucene_APBILL_u`;
  1795. delimiter ;;
  1796. CREATE DEFINER = `root`@`%` TRIGGER `lucene_APBILL_u` AFTER UPDATE ON `PURC$APBILL` FOR EACH ROW
  1797. begin
  1798. declare v_table_name varchar(64) default 'PURC$APBILL';
  1799. declare v_method_type varchar(6) default 'UPDATE';
  1800. declare v_data_id int;
  1801. declare v_data text default null;
  1802. declare v_priority int default 1;
  1803. set v_data_id=old.pab_id;
  1804. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1805. end
  1806. ;;
  1807. delimiter ;
  1808. -- ----------------------------
  1809. -- Triggers structure for table PURC$APBILL
  1810. -- ----------------------------
  1811. DROP TRIGGER IF EXISTS `lucene_APBILL_d`;
  1812. delimiter ;;
  1813. CREATE DEFINER = `root`@`%` TRIGGER `lucene_APBILL_d` AFTER DELETE ON `PURC$APBILL` FOR EACH ROW
  1814. begin
  1815. declare v_table_name varchar(64) default 'PURC$APBILL';
  1816. declare v_method_type varchar(6) default 'DELETE';
  1817. declare v_data_id int;
  1818. declare v_data text default null;
  1819. declare v_priority int default 1;
  1820. set v_data_id=old.pab_id;
  1821. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1822. end
  1823. ;;
  1824. delimiter ;
  1825. -- ----------------------------
  1826. -- Triggers structure for table PURC$APCHECK
  1827. -- ----------------------------
  1828. DROP TRIGGER IF EXISTS `lucene_APCHECK_d`;
  1829. delimiter ;;
  1830. CREATE DEFINER = `root`@`%` TRIGGER `lucene_APCHECK_d` AFTER DELETE ON `PURC$APCHECK` FOR EACH ROW
  1831. begin
  1832. declare v_table_name varchar(64) default 'purc$apcheck';
  1833. declare v_method_type varchar(6) default 'DELETE';
  1834. declare v_data_id int;
  1835. declare v_data text default null;
  1836. declare v_priority int default 1;
  1837. set v_data_id=old.pa_id;
  1838. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1839. end
  1840. ;;
  1841. delimiter ;
  1842. -- ----------------------------
  1843. -- Triggers structure for table PURC$APCHECK
  1844. -- ----------------------------
  1845. DROP TRIGGER IF EXISTS `lucene_APCHECK_u`;
  1846. delimiter ;;
  1847. CREATE DEFINER = `root`@`%` TRIGGER `lucene_APCHECK_u` AFTER update ON `PURC$APCHECK` FOR EACH ROW
  1848. begin
  1849. declare v_table_name varchar(64) default 'purc$apcheck';
  1850. declare v_method_type varchar(6) default 'update';
  1851. declare v_data_id int;
  1852. declare v_data text default null;
  1853. declare v_priority int default 1;
  1854. set v_data_id=old.pa_id;
  1855. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1856. end
  1857. ;;
  1858. delimiter ;
  1859. -- ----------------------------
  1860. -- Triggers structure for table PURC$APCHECK
  1861. -- ----------------------------
  1862. DROP TRIGGER IF EXISTS `lucene_APCHECK_i`;
  1863. delimiter ;;
  1864. CREATE DEFINER = `root`@`%` TRIGGER `lucene_APCHECK_i` AFTER INSERT ON `PURC$APCHECK` FOR EACH ROW
  1865. begin
  1866. declare v_table_name varchar(64) default 'purc$apcheck';
  1867. declare v_method_type varchar(6) default 'INSERT';
  1868. declare v_data_id int;
  1869. declare v_data text default null;
  1870. declare v_priority int default 1;
  1871. set v_data_id=new.pa_id;
  1872. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1873. end
  1874. ;;
  1875. delimiter ;
  1876. -- ----------------------------
  1877. -- Triggers structure for table PURC$BADIN
  1878. -- ----------------------------
  1879. DROP TRIGGER IF EXISTS `lucene_BADIN_i`;
  1880. delimiter ;;
  1881. CREATE DEFINER = `root`@`%` TRIGGER `lucene_BADIN_i` AFTER INSERT ON `PURC$BADIN` FOR EACH ROW
  1882. begin
  1883. declare v_table_name varchar(64) default 'purc$badin';
  1884. declare v_method_type varchar(6) default 'INSERT';
  1885. declare v_data_id int;
  1886. declare v_data text default null;
  1887. declare v_priority int default 1;
  1888. set v_data_id=new.pb_id;
  1889. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1890. end
  1891. ;;
  1892. delimiter ;
  1893. -- ----------------------------
  1894. -- Triggers structure for table PURC$BADIN
  1895. -- ----------------------------
  1896. DROP TRIGGER IF EXISTS `lucene_BADIN_u`;
  1897. delimiter ;;
  1898. CREATE DEFINER = `root`@`%` TRIGGER `lucene_BADIN_u` AFTER UPDATE ON `PURC$BADIN` FOR EACH ROW
  1899. begin
  1900. declare v_table_name varchar(64) default 'purc$badin';
  1901. declare v_method_type varchar(6) default 'UPDATE';
  1902. declare v_data_id int;
  1903. declare v_data text default null;
  1904. declare v_priority int default 1;
  1905. set v_data_id=old.pb_id;
  1906. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1907. end
  1908. ;;
  1909. delimiter ;
  1910. -- ----------------------------
  1911. -- Triggers structure for table PURC$BADIN
  1912. -- ----------------------------
  1913. DROP TRIGGER IF EXISTS `lucene_BADIN_d`;
  1914. delimiter ;;
  1915. CREATE DEFINER = `root`@`%` TRIGGER `lucene_BADIN_d` AFTER DELETE ON `PURC$BADIN` FOR EACH ROW
  1916. begin
  1917. declare v_table_name varchar(64) default 'purc$badin';
  1918. declare v_method_type varchar(6) default 'DELETE';
  1919. declare v_data_id int;
  1920. declare v_data text default null;
  1921. declare v_priority int default 1;
  1922. set v_data_id=old.pb_id;
  1923. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1924. end
  1925. ;;
  1926. delimiter ;
  1927. -- ----------------------------
  1928. -- Triggers structure for table PURC$BADOUT
  1929. -- ----------------------------
  1930. DROP TRIGGER IF EXISTS `lucene_BADOUT_d`;
  1931. delimiter ;;
  1932. CREATE DEFINER = `root`@`%` TRIGGER `lucene_BADOUT_d` AFTER DELETE ON `PURC$BADOUT` FOR EACH ROW
  1933. begin
  1934. declare v_table_name varchar(64) default 'purc$badout';
  1935. declare v_method_type varchar(6) default 'DELETE';
  1936. declare v_data_id int;
  1937. declare v_data text default null;
  1938. declare v_priority int default 1;
  1939. set v_data_id=old.po_id;
  1940. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1941. end
  1942. ;;
  1943. delimiter ;
  1944. -- ----------------------------
  1945. -- Triggers structure for table PURC$BADOUT
  1946. -- ----------------------------
  1947. DROP TRIGGER IF EXISTS `lucene_BADOUT_u`;
  1948. delimiter ;;
  1949. CREATE DEFINER = `root`@`%` TRIGGER `lucene_BADOUT_u` AFTER UPDATE ON `PURC$BADOUT` FOR EACH ROW
  1950. begin
  1951. declare v_table_name varchar(64) default 'purc$badout';
  1952. declare v_method_type varchar(6) default 'UPDATE';
  1953. declare v_data_id int;
  1954. declare v_data text default null;
  1955. declare v_priority int default 1;
  1956. set v_data_id=old.po_id;
  1957. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1958. end
  1959. ;;
  1960. delimiter ;
  1961. -- ----------------------------
  1962. -- Triggers structure for table PURC$BADOUT
  1963. -- ----------------------------
  1964. DROP TRIGGER IF EXISTS `lucene_BADOUT_i`;
  1965. delimiter ;;
  1966. CREATE DEFINER = `root`@`%` TRIGGER `lucene_BADOUT_i` AFTER INSERT ON `PURC$BADOUT` FOR EACH ROW
  1967. begin
  1968. declare v_table_name varchar(64) default 'purc$badout';
  1969. declare v_method_type varchar(6) default 'INSERT';
  1970. declare v_data_id int;
  1971. declare v_data text default null;
  1972. declare v_priority int default 1;
  1973. set v_data_id=new.po_id;
  1974. call enqueue_lucene_message(v_table_name, v_method_type, v_data_id, v_data, v_priority);
  1975. end
  1976. ;;
  1977. delimiter ;