101.json 144 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679
  1. {
  2. "formatVersion": 1,
  3. "database": {
  4. "version": 101,
  5. "identityHash": "2526386cd72de142378cad9f0d86441c",
  6. "entities": [
  7. {
  8. "tableName": "books",
  9. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookUrl` TEXT NOT NULL DEFAULT '', `tocUrl` TEXT NOT NULL DEFAULT '', `origin` TEXT NOT NULL DEFAULT 'loc_book', `originName` TEXT NOT NULL DEFAULT '', `name` TEXT NOT NULL DEFAULT '', `author` TEXT NOT NULL DEFAULT '', `kind` TEXT, `customTag` TEXT, `coverUrl` TEXT, `customCoverUrl` TEXT, `intro` TEXT, `customIntro` TEXT, `remark` TEXT, `charset` TEXT, `type` INTEGER NOT NULL DEFAULT 0, `group` INTEGER NOT NULL DEFAULT 0, `latestChapterTitle` TEXT, `latestChapterTime` INTEGER NOT NULL DEFAULT 0, `lastCheckTime` INTEGER NOT NULL DEFAULT 0, `lastCheckCount` INTEGER NOT NULL DEFAULT 0, `totalChapterNum` INTEGER NOT NULL DEFAULT 0, `durChapterTitle` TEXT, `durChapterIndex` INTEGER NOT NULL DEFAULT 0, `durChapterPos` INTEGER NOT NULL DEFAULT 0, `durChapterTime` INTEGER NOT NULL DEFAULT 0, `wordCount` TEXT, `canUpdate` INTEGER NOT NULL DEFAULT 1, `order` INTEGER NOT NULL DEFAULT 0, `originOrder` INTEGER NOT NULL DEFAULT 0, `variable` TEXT, `readConfig` TEXT, `syncTime` INTEGER NOT NULL DEFAULT 0, `listIntro` TEXT, PRIMARY KEY(`bookUrl`))",
  10. "fields": [
  11. {
  12. "fieldPath": "bookUrl",
  13. "columnName": "bookUrl",
  14. "affinity": "TEXT",
  15. "notNull": true,
  16. "defaultValue": "''"
  17. },
  18. {
  19. "fieldPath": "tocUrl",
  20. "columnName": "tocUrl",
  21. "affinity": "TEXT",
  22. "notNull": true,
  23. "defaultValue": "''"
  24. },
  25. {
  26. "fieldPath": "origin",
  27. "columnName": "origin",
  28. "affinity": "TEXT",
  29. "notNull": true,
  30. "defaultValue": "'loc_book'"
  31. },
  32. {
  33. "fieldPath": "originName",
  34. "columnName": "originName",
  35. "affinity": "TEXT",
  36. "notNull": true,
  37. "defaultValue": "''"
  38. },
  39. {
  40. "fieldPath": "name",
  41. "columnName": "name",
  42. "affinity": "TEXT",
  43. "notNull": true,
  44. "defaultValue": "''"
  45. },
  46. {
  47. "fieldPath": "author",
  48. "columnName": "author",
  49. "affinity": "TEXT",
  50. "notNull": true,
  51. "defaultValue": "''"
  52. },
  53. {
  54. "fieldPath": "kind",
  55. "columnName": "kind",
  56. "affinity": "TEXT"
  57. },
  58. {
  59. "fieldPath": "customTag",
  60. "columnName": "customTag",
  61. "affinity": "TEXT"
  62. },
  63. {
  64. "fieldPath": "coverUrl",
  65. "columnName": "coverUrl",
  66. "affinity": "TEXT"
  67. },
  68. {
  69. "fieldPath": "customCoverUrl",
  70. "columnName": "customCoverUrl",
  71. "affinity": "TEXT"
  72. },
  73. {
  74. "fieldPath": "intro",
  75. "columnName": "intro",
  76. "affinity": "TEXT"
  77. },
  78. {
  79. "fieldPath": "customIntro",
  80. "columnName": "customIntro",
  81. "affinity": "TEXT"
  82. },
  83. {
  84. "fieldPath": "remark",
  85. "columnName": "remark",
  86. "affinity": "TEXT"
  87. },
  88. {
  89. "fieldPath": "charset",
  90. "columnName": "charset",
  91. "affinity": "TEXT"
  92. },
  93. {
  94. "fieldPath": "type",
  95. "columnName": "type",
  96. "affinity": "INTEGER",
  97. "notNull": true,
  98. "defaultValue": "0"
  99. },
  100. {
  101. "fieldPath": "group",
  102. "columnName": "group",
  103. "affinity": "INTEGER",
  104. "notNull": true,
  105. "defaultValue": "0"
  106. },
  107. {
  108. "fieldPath": "latestChapterTitle",
  109. "columnName": "latestChapterTitle",
  110. "affinity": "TEXT"
  111. },
  112. {
  113. "fieldPath": "latestChapterTime",
  114. "columnName": "latestChapterTime",
  115. "affinity": "INTEGER",
  116. "notNull": true,
  117. "defaultValue": "0"
  118. },
  119. {
  120. "fieldPath": "lastCheckTime",
  121. "columnName": "lastCheckTime",
  122. "affinity": "INTEGER",
  123. "notNull": true,
  124. "defaultValue": "0"
  125. },
  126. {
  127. "fieldPath": "lastCheckCount",
  128. "columnName": "lastCheckCount",
  129. "affinity": "INTEGER",
  130. "notNull": true,
  131. "defaultValue": "0"
  132. },
  133. {
  134. "fieldPath": "totalChapterNum",
  135. "columnName": "totalChapterNum",
  136. "affinity": "INTEGER",
  137. "notNull": true,
  138. "defaultValue": "0"
  139. },
  140. {
  141. "fieldPath": "durChapterTitle",
  142. "columnName": "durChapterTitle",
  143. "affinity": "TEXT"
  144. },
  145. {
  146. "fieldPath": "durChapterIndex",
  147. "columnName": "durChapterIndex",
  148. "affinity": "INTEGER",
  149. "notNull": true,
  150. "defaultValue": "0"
  151. },
  152. {
  153. "fieldPath": "durChapterPos",
  154. "columnName": "durChapterPos",
  155. "affinity": "INTEGER",
  156. "notNull": true,
  157. "defaultValue": "0"
  158. },
  159. {
  160. "fieldPath": "durChapterTime",
  161. "columnName": "durChapterTime",
  162. "affinity": "INTEGER",
  163. "notNull": true,
  164. "defaultValue": "0"
  165. },
  166. {
  167. "fieldPath": "wordCount",
  168. "columnName": "wordCount",
  169. "affinity": "TEXT"
  170. },
  171. {
  172. "fieldPath": "canUpdate",
  173. "columnName": "canUpdate",
  174. "affinity": "INTEGER",
  175. "notNull": true,
  176. "defaultValue": "1"
  177. },
  178. {
  179. "fieldPath": "order",
  180. "columnName": "order",
  181. "affinity": "INTEGER",
  182. "notNull": true,
  183. "defaultValue": "0"
  184. },
  185. {
  186. "fieldPath": "originOrder",
  187. "columnName": "originOrder",
  188. "affinity": "INTEGER",
  189. "notNull": true,
  190. "defaultValue": "0"
  191. },
  192. {
  193. "fieldPath": "variable",
  194. "columnName": "variable",
  195. "affinity": "TEXT"
  196. },
  197. {
  198. "fieldPath": "readConfig",
  199. "columnName": "readConfig",
  200. "affinity": "TEXT"
  201. },
  202. {
  203. "fieldPath": "syncTime",
  204. "columnName": "syncTime",
  205. "affinity": "INTEGER",
  206. "notNull": true,
  207. "defaultValue": "0"
  208. },
  209. {
  210. "fieldPath": "listIntro",
  211. "columnName": "listIntro",
  212. "affinity": "TEXT"
  213. }
  214. ],
  215. "primaryKey": {
  216. "autoGenerate": false,
  217. "columnNames": [
  218. "bookUrl"
  219. ]
  220. },
  221. "indices": [
  222. {
  223. "name": "index_books_name_author",
  224. "unique": false,
  225. "columnNames": [
  226. "name",
  227. "author"
  228. ],
  229. "orders": [],
  230. "createSql": "CREATE INDEX IF NOT EXISTS `index_books_name_author` ON `${TABLE_NAME}` (`name`, `author`)"
  231. },
  232. {
  233. "name": "index_books_durChapterTime",
  234. "unique": false,
  235. "columnNames": [
  236. "durChapterTime"
  237. ],
  238. "orders": [],
  239. "createSql": "CREATE INDEX IF NOT EXISTS `index_books_durChapterTime` ON `${TABLE_NAME}` (`durChapterTime`)"
  240. }
  241. ]
  242. },
  243. {
  244. "tableName": "book_groups",
  245. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`groupId` INTEGER NOT NULL, `groupName` TEXT NOT NULL, `cover` TEXT, `order` INTEGER NOT NULL, `enableRefresh` INTEGER NOT NULL DEFAULT 1, `show` INTEGER NOT NULL DEFAULT 1, `bookSort` INTEGER NOT NULL DEFAULT -1, `isPrivate` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`groupId`))",
  246. "fields": [
  247. {
  248. "fieldPath": "groupId",
  249. "columnName": "groupId",
  250. "affinity": "INTEGER",
  251. "notNull": true
  252. },
  253. {
  254. "fieldPath": "groupName",
  255. "columnName": "groupName",
  256. "affinity": "TEXT",
  257. "notNull": true
  258. },
  259. {
  260. "fieldPath": "cover",
  261. "columnName": "cover",
  262. "affinity": "TEXT"
  263. },
  264. {
  265. "fieldPath": "order",
  266. "columnName": "order",
  267. "affinity": "INTEGER",
  268. "notNull": true
  269. },
  270. {
  271. "fieldPath": "enableRefresh",
  272. "columnName": "enableRefresh",
  273. "affinity": "INTEGER",
  274. "notNull": true,
  275. "defaultValue": "1"
  276. },
  277. {
  278. "fieldPath": "show",
  279. "columnName": "show",
  280. "affinity": "INTEGER",
  281. "notNull": true,
  282. "defaultValue": "1"
  283. },
  284. {
  285. "fieldPath": "bookSort",
  286. "columnName": "bookSort",
  287. "affinity": "INTEGER",
  288. "notNull": true,
  289. "defaultValue": "-1"
  290. },
  291. {
  292. "fieldPath": "isPrivate",
  293. "columnName": "isPrivate",
  294. "affinity": "INTEGER",
  295. "notNull": true,
  296. "defaultValue": "0"
  297. }
  298. ],
  299. "primaryKey": {
  300. "autoGenerate": false,
  301. "columnNames": [
  302. "groupId"
  303. ]
  304. }
  305. },
  306. {
  307. "tableName": "book_sources",
  308. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookSourceUrl` TEXT NOT NULL, `bookSourceName` TEXT NOT NULL, `bookSourceGroup` TEXT, `bookSourceType` INTEGER NOT NULL, `bookUrlPattern` TEXT, `customOrder` INTEGER NOT NULL DEFAULT 0, `enabled` INTEGER NOT NULL DEFAULT 1, `enabledExplore` INTEGER NOT NULL DEFAULT 1, `jsLib` TEXT, `enabledCookieJar` INTEGER DEFAULT 0, `concurrentRate` TEXT, `header` TEXT, `loginUrl` TEXT, `loginUi` TEXT, `loginCheckJs` TEXT, `coverDecodeJs` TEXT, `bookSourceComment` TEXT, `variableComment` TEXT, `lastUpdateTime` INTEGER NOT NULL, `respondTime` INTEGER NOT NULL, `weight` INTEGER NOT NULL, `exploreUrl` TEXT, `exploreScreen` TEXT, `ruleExplore` TEXT, `searchUrl` TEXT, `ruleSearch` TEXT, `ruleBookInfo` TEXT, `ruleToc` TEXT, `ruleContent` TEXT, `ruleReview` TEXT, `eventListener` INTEGER NOT NULL DEFAULT 0, `customButton` INTEGER NOT NULL DEFAULT 0, `homepageModules` TEXT, PRIMARY KEY(`bookSourceUrl`))",
  309. "fields": [
  310. {
  311. "fieldPath": "bookSourceUrl",
  312. "columnName": "bookSourceUrl",
  313. "affinity": "TEXT",
  314. "notNull": true
  315. },
  316. {
  317. "fieldPath": "bookSourceName",
  318. "columnName": "bookSourceName",
  319. "affinity": "TEXT",
  320. "notNull": true
  321. },
  322. {
  323. "fieldPath": "bookSourceGroup",
  324. "columnName": "bookSourceGroup",
  325. "affinity": "TEXT"
  326. },
  327. {
  328. "fieldPath": "bookSourceType",
  329. "columnName": "bookSourceType",
  330. "affinity": "INTEGER",
  331. "notNull": true
  332. },
  333. {
  334. "fieldPath": "bookUrlPattern",
  335. "columnName": "bookUrlPattern",
  336. "affinity": "TEXT"
  337. },
  338. {
  339. "fieldPath": "customOrder",
  340. "columnName": "customOrder",
  341. "affinity": "INTEGER",
  342. "notNull": true,
  343. "defaultValue": "0"
  344. },
  345. {
  346. "fieldPath": "enabled",
  347. "columnName": "enabled",
  348. "affinity": "INTEGER",
  349. "notNull": true,
  350. "defaultValue": "1"
  351. },
  352. {
  353. "fieldPath": "enabledExplore",
  354. "columnName": "enabledExplore",
  355. "affinity": "INTEGER",
  356. "notNull": true,
  357. "defaultValue": "1"
  358. },
  359. {
  360. "fieldPath": "jsLib",
  361. "columnName": "jsLib",
  362. "affinity": "TEXT"
  363. },
  364. {
  365. "fieldPath": "enabledCookieJar",
  366. "columnName": "enabledCookieJar",
  367. "affinity": "INTEGER",
  368. "defaultValue": "0"
  369. },
  370. {
  371. "fieldPath": "concurrentRate",
  372. "columnName": "concurrentRate",
  373. "affinity": "TEXT"
  374. },
  375. {
  376. "fieldPath": "header",
  377. "columnName": "header",
  378. "affinity": "TEXT"
  379. },
  380. {
  381. "fieldPath": "loginUrl",
  382. "columnName": "loginUrl",
  383. "affinity": "TEXT"
  384. },
  385. {
  386. "fieldPath": "loginUi",
  387. "columnName": "loginUi",
  388. "affinity": "TEXT"
  389. },
  390. {
  391. "fieldPath": "loginCheckJs",
  392. "columnName": "loginCheckJs",
  393. "affinity": "TEXT"
  394. },
  395. {
  396. "fieldPath": "coverDecodeJs",
  397. "columnName": "coverDecodeJs",
  398. "affinity": "TEXT"
  399. },
  400. {
  401. "fieldPath": "bookSourceComment",
  402. "columnName": "bookSourceComment",
  403. "affinity": "TEXT"
  404. },
  405. {
  406. "fieldPath": "variableComment",
  407. "columnName": "variableComment",
  408. "affinity": "TEXT"
  409. },
  410. {
  411. "fieldPath": "lastUpdateTime",
  412. "columnName": "lastUpdateTime",
  413. "affinity": "INTEGER",
  414. "notNull": true
  415. },
  416. {
  417. "fieldPath": "respondTime",
  418. "columnName": "respondTime",
  419. "affinity": "INTEGER",
  420. "notNull": true
  421. },
  422. {
  423. "fieldPath": "weight",
  424. "columnName": "weight",
  425. "affinity": "INTEGER",
  426. "notNull": true
  427. },
  428. {
  429. "fieldPath": "exploreUrl",
  430. "columnName": "exploreUrl",
  431. "affinity": "TEXT"
  432. },
  433. {
  434. "fieldPath": "exploreScreen",
  435. "columnName": "exploreScreen",
  436. "affinity": "TEXT"
  437. },
  438. {
  439. "fieldPath": "ruleExplore",
  440. "columnName": "ruleExplore",
  441. "affinity": "TEXT"
  442. },
  443. {
  444. "fieldPath": "searchUrl",
  445. "columnName": "searchUrl",
  446. "affinity": "TEXT"
  447. },
  448. {
  449. "fieldPath": "ruleSearch",
  450. "columnName": "ruleSearch",
  451. "affinity": "TEXT"
  452. },
  453. {
  454. "fieldPath": "ruleBookInfo",
  455. "columnName": "ruleBookInfo",
  456. "affinity": "TEXT"
  457. },
  458. {
  459. "fieldPath": "ruleToc",
  460. "columnName": "ruleToc",
  461. "affinity": "TEXT"
  462. },
  463. {
  464. "fieldPath": "ruleContent",
  465. "columnName": "ruleContent",
  466. "affinity": "TEXT"
  467. },
  468. {
  469. "fieldPath": "ruleReview",
  470. "columnName": "ruleReview",
  471. "affinity": "TEXT"
  472. },
  473. {
  474. "fieldPath": "eventListener",
  475. "columnName": "eventListener",
  476. "affinity": "INTEGER",
  477. "notNull": true,
  478. "defaultValue": "0"
  479. },
  480. {
  481. "fieldPath": "customButton",
  482. "columnName": "customButton",
  483. "affinity": "INTEGER",
  484. "notNull": true,
  485. "defaultValue": "0"
  486. },
  487. {
  488. "fieldPath": "homepageModules",
  489. "columnName": "homepageModules",
  490. "affinity": "TEXT"
  491. }
  492. ],
  493. "primaryKey": {
  494. "autoGenerate": false,
  495. "columnNames": [
  496. "bookSourceUrl"
  497. ]
  498. },
  499. "indices": [
  500. {
  501. "name": "index_book_sources_bookSourceUrl",
  502. "unique": false,
  503. "columnNames": [
  504. "bookSourceUrl"
  505. ],
  506. "orders": [],
  507. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_sources_bookSourceUrl` ON `${TABLE_NAME}` (`bookSourceUrl`)"
  508. }
  509. ]
  510. },
  511. {
  512. "tableName": "chapters",
  513. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`url` TEXT NOT NULL, `title` TEXT NOT NULL, `isVolume` INTEGER NOT NULL, `tocLevel` INTEGER NOT NULL DEFAULT 0, `baseUrl` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `index` INTEGER NOT NULL, `isVip` INTEGER NOT NULL, `isPay` INTEGER NOT NULL, `resourceUrl` TEXT, `tag` TEXT, `wordCount` TEXT, `start` INTEGER, `end` INTEGER, `startFragmentId` TEXT, `endFragmentId` TEXT, `variable` TEXT, `reviewImg` TEXT, PRIMARY KEY(`url`, `bookUrl`), FOREIGN KEY(`bookUrl`) REFERENCES `books`(`bookUrl`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  514. "fields": [
  515. {
  516. "fieldPath": "url",
  517. "columnName": "url",
  518. "affinity": "TEXT",
  519. "notNull": true
  520. },
  521. {
  522. "fieldPath": "title",
  523. "columnName": "title",
  524. "affinity": "TEXT",
  525. "notNull": true
  526. },
  527. {
  528. "fieldPath": "isVolume",
  529. "columnName": "isVolume",
  530. "affinity": "INTEGER",
  531. "notNull": true
  532. },
  533. {
  534. "fieldPath": "tocLevel",
  535. "columnName": "tocLevel",
  536. "affinity": "INTEGER",
  537. "notNull": true,
  538. "defaultValue": "0"
  539. },
  540. {
  541. "fieldPath": "baseUrl",
  542. "columnName": "baseUrl",
  543. "affinity": "TEXT",
  544. "notNull": true
  545. },
  546. {
  547. "fieldPath": "bookUrl",
  548. "columnName": "bookUrl",
  549. "affinity": "TEXT",
  550. "notNull": true
  551. },
  552. {
  553. "fieldPath": "index",
  554. "columnName": "index",
  555. "affinity": "INTEGER",
  556. "notNull": true
  557. },
  558. {
  559. "fieldPath": "isVip",
  560. "columnName": "isVip",
  561. "affinity": "INTEGER",
  562. "notNull": true
  563. },
  564. {
  565. "fieldPath": "isPay",
  566. "columnName": "isPay",
  567. "affinity": "INTEGER",
  568. "notNull": true
  569. },
  570. {
  571. "fieldPath": "resourceUrl",
  572. "columnName": "resourceUrl",
  573. "affinity": "TEXT"
  574. },
  575. {
  576. "fieldPath": "tag",
  577. "columnName": "tag",
  578. "affinity": "TEXT"
  579. },
  580. {
  581. "fieldPath": "wordCount",
  582. "columnName": "wordCount",
  583. "affinity": "TEXT"
  584. },
  585. {
  586. "fieldPath": "start",
  587. "columnName": "start",
  588. "affinity": "INTEGER"
  589. },
  590. {
  591. "fieldPath": "end",
  592. "columnName": "end",
  593. "affinity": "INTEGER"
  594. },
  595. {
  596. "fieldPath": "startFragmentId",
  597. "columnName": "startFragmentId",
  598. "affinity": "TEXT"
  599. },
  600. {
  601. "fieldPath": "endFragmentId",
  602. "columnName": "endFragmentId",
  603. "affinity": "TEXT"
  604. },
  605. {
  606. "fieldPath": "variable",
  607. "columnName": "variable",
  608. "affinity": "TEXT"
  609. },
  610. {
  611. "fieldPath": "reviewImg",
  612. "columnName": "reviewImg",
  613. "affinity": "TEXT"
  614. }
  615. ],
  616. "primaryKey": {
  617. "autoGenerate": false,
  618. "columnNames": [
  619. "url",
  620. "bookUrl"
  621. ]
  622. },
  623. "indices": [
  624. {
  625. "name": "index_chapters_bookUrl",
  626. "unique": false,
  627. "columnNames": [
  628. "bookUrl"
  629. ],
  630. "orders": [],
  631. "createSql": "CREATE INDEX IF NOT EXISTS `index_chapters_bookUrl` ON `${TABLE_NAME}` (`bookUrl`)"
  632. },
  633. {
  634. "name": "index_chapters_bookUrl_index",
  635. "unique": true,
  636. "columnNames": [
  637. "bookUrl",
  638. "index"
  639. ],
  640. "orders": [],
  641. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_chapters_bookUrl_index` ON `${TABLE_NAME}` (`bookUrl`, `index`)"
  642. }
  643. ],
  644. "foreignKeys": [
  645. {
  646. "table": "books",
  647. "onDelete": "CASCADE",
  648. "onUpdate": "NO ACTION",
  649. "columns": [
  650. "bookUrl"
  651. ],
  652. "referencedColumns": [
  653. "bookUrl"
  654. ]
  655. }
  656. ]
  657. },
  658. {
  659. "tableName": "replace_rules",
  660. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL DEFAULT '', `group` TEXT, `pattern` TEXT NOT NULL DEFAULT '', `replacement` TEXT NOT NULL DEFAULT '', `scope` TEXT, `scopeTitle` INTEGER NOT NULL DEFAULT 0, `scopeContent` INTEGER NOT NULL DEFAULT 1, `excludeScope` TEXT, `isEnabled` INTEGER NOT NULL DEFAULT 1, `isRegex` INTEGER NOT NULL DEFAULT 1, `timeoutMillisecond` INTEGER NOT NULL DEFAULT 3000, `sortOrder` INTEGER NOT NULL DEFAULT 0)",
  661. "fields": [
  662. {
  663. "fieldPath": "id",
  664. "columnName": "id",
  665. "affinity": "INTEGER",
  666. "notNull": true
  667. },
  668. {
  669. "fieldPath": "name",
  670. "columnName": "name",
  671. "affinity": "TEXT",
  672. "notNull": true,
  673. "defaultValue": "''"
  674. },
  675. {
  676. "fieldPath": "group",
  677. "columnName": "group",
  678. "affinity": "TEXT"
  679. },
  680. {
  681. "fieldPath": "pattern",
  682. "columnName": "pattern",
  683. "affinity": "TEXT",
  684. "notNull": true,
  685. "defaultValue": "''"
  686. },
  687. {
  688. "fieldPath": "replacement",
  689. "columnName": "replacement",
  690. "affinity": "TEXT",
  691. "notNull": true,
  692. "defaultValue": "''"
  693. },
  694. {
  695. "fieldPath": "scope",
  696. "columnName": "scope",
  697. "affinity": "TEXT"
  698. },
  699. {
  700. "fieldPath": "scopeTitle",
  701. "columnName": "scopeTitle",
  702. "affinity": "INTEGER",
  703. "notNull": true,
  704. "defaultValue": "0"
  705. },
  706. {
  707. "fieldPath": "scopeContent",
  708. "columnName": "scopeContent",
  709. "affinity": "INTEGER",
  710. "notNull": true,
  711. "defaultValue": "1"
  712. },
  713. {
  714. "fieldPath": "excludeScope",
  715. "columnName": "excludeScope",
  716. "affinity": "TEXT"
  717. },
  718. {
  719. "fieldPath": "isEnabled",
  720. "columnName": "isEnabled",
  721. "affinity": "INTEGER",
  722. "notNull": true,
  723. "defaultValue": "1"
  724. },
  725. {
  726. "fieldPath": "isRegex",
  727. "columnName": "isRegex",
  728. "affinity": "INTEGER",
  729. "notNull": true,
  730. "defaultValue": "1"
  731. },
  732. {
  733. "fieldPath": "timeoutMillisecond",
  734. "columnName": "timeoutMillisecond",
  735. "affinity": "INTEGER",
  736. "notNull": true,
  737. "defaultValue": "3000"
  738. },
  739. {
  740. "fieldPath": "order",
  741. "columnName": "sortOrder",
  742. "affinity": "INTEGER",
  743. "notNull": true,
  744. "defaultValue": "0"
  745. }
  746. ],
  747. "primaryKey": {
  748. "autoGenerate": true,
  749. "columnNames": [
  750. "id"
  751. ]
  752. },
  753. "indices": [
  754. {
  755. "name": "index_replace_rules_id",
  756. "unique": false,
  757. "columnNames": [
  758. "id"
  759. ],
  760. "orders": [],
  761. "createSql": "CREATE INDEX IF NOT EXISTS `index_replace_rules_id` ON `${TABLE_NAME}` (`id`)"
  762. }
  763. ]
  764. },
  765. {
  766. "tableName": "searchBooks",
  767. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookUrl` TEXT NOT NULL, `origin` TEXT NOT NULL, `originName` TEXT NOT NULL, `type` INTEGER NOT NULL, `name` TEXT NOT NULL, `author` TEXT NOT NULL, `kind` TEXT, `coverUrl` TEXT, `intro` TEXT, `wordCount` TEXT, `latestChapterTitle` TEXT, `tocUrl` TEXT NOT NULL, `time` INTEGER NOT NULL, `variable` TEXT, `originOrder` INTEGER NOT NULL, `chapterWordCountText` TEXT, `chapterWordCount` INTEGER NOT NULL DEFAULT -1, `respondTime` INTEGER NOT NULL DEFAULT -1, PRIMARY KEY(`bookUrl`), FOREIGN KEY(`origin`) REFERENCES `book_sources`(`bookSourceUrl`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  768. "fields": [
  769. {
  770. "fieldPath": "bookUrl",
  771. "columnName": "bookUrl",
  772. "affinity": "TEXT",
  773. "notNull": true
  774. },
  775. {
  776. "fieldPath": "origin",
  777. "columnName": "origin",
  778. "affinity": "TEXT",
  779. "notNull": true
  780. },
  781. {
  782. "fieldPath": "originName",
  783. "columnName": "originName",
  784. "affinity": "TEXT",
  785. "notNull": true
  786. },
  787. {
  788. "fieldPath": "type",
  789. "columnName": "type",
  790. "affinity": "INTEGER",
  791. "notNull": true
  792. },
  793. {
  794. "fieldPath": "name",
  795. "columnName": "name",
  796. "affinity": "TEXT",
  797. "notNull": true
  798. },
  799. {
  800. "fieldPath": "author",
  801. "columnName": "author",
  802. "affinity": "TEXT",
  803. "notNull": true
  804. },
  805. {
  806. "fieldPath": "kind",
  807. "columnName": "kind",
  808. "affinity": "TEXT"
  809. },
  810. {
  811. "fieldPath": "coverUrl",
  812. "columnName": "coverUrl",
  813. "affinity": "TEXT"
  814. },
  815. {
  816. "fieldPath": "intro",
  817. "columnName": "intro",
  818. "affinity": "TEXT"
  819. },
  820. {
  821. "fieldPath": "wordCount",
  822. "columnName": "wordCount",
  823. "affinity": "TEXT"
  824. },
  825. {
  826. "fieldPath": "latestChapterTitle",
  827. "columnName": "latestChapterTitle",
  828. "affinity": "TEXT"
  829. },
  830. {
  831. "fieldPath": "tocUrl",
  832. "columnName": "tocUrl",
  833. "affinity": "TEXT",
  834. "notNull": true
  835. },
  836. {
  837. "fieldPath": "time",
  838. "columnName": "time",
  839. "affinity": "INTEGER",
  840. "notNull": true
  841. },
  842. {
  843. "fieldPath": "variable",
  844. "columnName": "variable",
  845. "affinity": "TEXT"
  846. },
  847. {
  848. "fieldPath": "originOrder",
  849. "columnName": "originOrder",
  850. "affinity": "INTEGER",
  851. "notNull": true
  852. },
  853. {
  854. "fieldPath": "chapterWordCountText",
  855. "columnName": "chapterWordCountText",
  856. "affinity": "TEXT"
  857. },
  858. {
  859. "fieldPath": "chapterWordCount",
  860. "columnName": "chapterWordCount",
  861. "affinity": "INTEGER",
  862. "notNull": true,
  863. "defaultValue": "-1"
  864. },
  865. {
  866. "fieldPath": "respondTime",
  867. "columnName": "respondTime",
  868. "affinity": "INTEGER",
  869. "notNull": true,
  870. "defaultValue": "-1"
  871. }
  872. ],
  873. "primaryKey": {
  874. "autoGenerate": false,
  875. "columnNames": [
  876. "bookUrl"
  877. ]
  878. },
  879. "indices": [
  880. {
  881. "name": "index_searchBooks_bookUrl",
  882. "unique": true,
  883. "columnNames": [
  884. "bookUrl"
  885. ],
  886. "orders": [],
  887. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_searchBooks_bookUrl` ON `${TABLE_NAME}` (`bookUrl`)"
  888. },
  889. {
  890. "name": "index_searchBooks_origin",
  891. "unique": false,
  892. "columnNames": [
  893. "origin"
  894. ],
  895. "orders": [],
  896. "createSql": "CREATE INDEX IF NOT EXISTS `index_searchBooks_origin` ON `${TABLE_NAME}` (`origin`)"
  897. }
  898. ],
  899. "foreignKeys": [
  900. {
  901. "table": "book_sources",
  902. "onDelete": "CASCADE",
  903. "onUpdate": "NO ACTION",
  904. "columns": [
  905. "origin"
  906. ],
  907. "referencedColumns": [
  908. "bookSourceUrl"
  909. ]
  910. }
  911. ]
  912. },
  913. {
  914. "tableName": "search_keywords",
  915. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`word` TEXT NOT NULL, `usage` INTEGER NOT NULL, `lastUseTime` INTEGER NOT NULL, PRIMARY KEY(`word`))",
  916. "fields": [
  917. {
  918. "fieldPath": "word",
  919. "columnName": "word",
  920. "affinity": "TEXT",
  921. "notNull": true
  922. },
  923. {
  924. "fieldPath": "usage",
  925. "columnName": "usage",
  926. "affinity": "INTEGER",
  927. "notNull": true
  928. },
  929. {
  930. "fieldPath": "lastUseTime",
  931. "columnName": "lastUseTime",
  932. "affinity": "INTEGER",
  933. "notNull": true
  934. }
  935. ],
  936. "primaryKey": {
  937. "autoGenerate": false,
  938. "columnNames": [
  939. "word"
  940. ]
  941. },
  942. "indices": [
  943. {
  944. "name": "index_search_keywords_word",
  945. "unique": true,
  946. "columnNames": [
  947. "word"
  948. ],
  949. "orders": [],
  950. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_keywords_word` ON `${TABLE_NAME}` (`word`)"
  951. }
  952. ]
  953. },
  954. {
  955. "tableName": "cookies",
  956. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`url` TEXT NOT NULL, `cookie` TEXT NOT NULL, PRIMARY KEY(`url`))",
  957. "fields": [
  958. {
  959. "fieldPath": "url",
  960. "columnName": "url",
  961. "affinity": "TEXT",
  962. "notNull": true
  963. },
  964. {
  965. "fieldPath": "cookie",
  966. "columnName": "cookie",
  967. "affinity": "TEXT",
  968. "notNull": true
  969. }
  970. ],
  971. "primaryKey": {
  972. "autoGenerate": false,
  973. "columnNames": [
  974. "url"
  975. ]
  976. },
  977. "indices": [
  978. {
  979. "name": "index_cookies_url",
  980. "unique": true,
  981. "columnNames": [
  982. "url"
  983. ],
  984. "orders": [],
  985. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_cookies_url` ON `${TABLE_NAME}` (`url`)"
  986. }
  987. ]
  988. },
  989. {
  990. "tableName": "rssSources",
  991. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`sourceUrl` TEXT NOT NULL, `sourceName` TEXT NOT NULL, `sourceIcon` TEXT NOT NULL, `sourceGroup` TEXT, `sourceComment` TEXT, `enabled` INTEGER NOT NULL, `variableComment` TEXT, `jsLib` TEXT, `enabledCookieJar` INTEGER DEFAULT 0, `concurrentRate` TEXT, `header` TEXT, `loginUrl` TEXT, `loginUi` TEXT, `loginCheckJs` TEXT, `coverDecodeJs` TEXT, `sortUrl` TEXT, `singleUrl` INTEGER NOT NULL, `articleStyle` INTEGER NOT NULL DEFAULT 0, `ruleArticles` TEXT, `ruleNextPage` TEXT, `ruleTitle` TEXT, `rulePubDate` TEXT, `ruleDescription` TEXT, `ruleImage` TEXT, `ruleLink` TEXT, `ruleContent` TEXT, `contentWhitelist` TEXT, `contentBlacklist` TEXT, `shouldOverrideUrlLoading` TEXT, `style` TEXT, `enableJs` INTEGER NOT NULL DEFAULT 1, `loadWithBaseUrl` INTEGER NOT NULL DEFAULT 1, `injectJs` TEXT, `preloadJs` TEXT, `startHtml` TEXT, `startStyle` TEXT, `startJs` TEXT, `showWebLog` INTEGER NOT NULL DEFAULT 0, `lastUpdateTime` INTEGER NOT NULL DEFAULT 0, `customOrder` INTEGER NOT NULL DEFAULT 0, `type` INTEGER NOT NULL DEFAULT 0, `preload` INTEGER NOT NULL DEFAULT 0, `cacheFirst` INTEGER NOT NULL DEFAULT 0, `searchUrl` TEXT, `redirectPolicy` TEXT NOT NULL DEFAULT 'ASK_CROSS_ORIGIN', PRIMARY KEY(`sourceUrl`))",
  992. "fields": [
  993. {
  994. "fieldPath": "sourceUrl",
  995. "columnName": "sourceUrl",
  996. "affinity": "TEXT",
  997. "notNull": true
  998. },
  999. {
  1000. "fieldPath": "sourceName",
  1001. "columnName": "sourceName",
  1002. "affinity": "TEXT",
  1003. "notNull": true
  1004. },
  1005. {
  1006. "fieldPath": "sourceIcon",
  1007. "columnName": "sourceIcon",
  1008. "affinity": "TEXT",
  1009. "notNull": true
  1010. },
  1011. {
  1012. "fieldPath": "sourceGroup",
  1013. "columnName": "sourceGroup",
  1014. "affinity": "TEXT"
  1015. },
  1016. {
  1017. "fieldPath": "sourceComment",
  1018. "columnName": "sourceComment",
  1019. "affinity": "TEXT"
  1020. },
  1021. {
  1022. "fieldPath": "enabled",
  1023. "columnName": "enabled",
  1024. "affinity": "INTEGER",
  1025. "notNull": true
  1026. },
  1027. {
  1028. "fieldPath": "variableComment",
  1029. "columnName": "variableComment",
  1030. "affinity": "TEXT"
  1031. },
  1032. {
  1033. "fieldPath": "jsLib",
  1034. "columnName": "jsLib",
  1035. "affinity": "TEXT"
  1036. },
  1037. {
  1038. "fieldPath": "enabledCookieJar",
  1039. "columnName": "enabledCookieJar",
  1040. "affinity": "INTEGER",
  1041. "defaultValue": "0"
  1042. },
  1043. {
  1044. "fieldPath": "concurrentRate",
  1045. "columnName": "concurrentRate",
  1046. "affinity": "TEXT"
  1047. },
  1048. {
  1049. "fieldPath": "header",
  1050. "columnName": "header",
  1051. "affinity": "TEXT"
  1052. },
  1053. {
  1054. "fieldPath": "loginUrl",
  1055. "columnName": "loginUrl",
  1056. "affinity": "TEXT"
  1057. },
  1058. {
  1059. "fieldPath": "loginUi",
  1060. "columnName": "loginUi",
  1061. "affinity": "TEXT"
  1062. },
  1063. {
  1064. "fieldPath": "loginCheckJs",
  1065. "columnName": "loginCheckJs",
  1066. "affinity": "TEXT"
  1067. },
  1068. {
  1069. "fieldPath": "coverDecodeJs",
  1070. "columnName": "coverDecodeJs",
  1071. "affinity": "TEXT"
  1072. },
  1073. {
  1074. "fieldPath": "sortUrl",
  1075. "columnName": "sortUrl",
  1076. "affinity": "TEXT"
  1077. },
  1078. {
  1079. "fieldPath": "singleUrl",
  1080. "columnName": "singleUrl",
  1081. "affinity": "INTEGER",
  1082. "notNull": true
  1083. },
  1084. {
  1085. "fieldPath": "articleStyle",
  1086. "columnName": "articleStyle",
  1087. "affinity": "INTEGER",
  1088. "notNull": true,
  1089. "defaultValue": "0"
  1090. },
  1091. {
  1092. "fieldPath": "ruleArticles",
  1093. "columnName": "ruleArticles",
  1094. "affinity": "TEXT"
  1095. },
  1096. {
  1097. "fieldPath": "ruleNextPage",
  1098. "columnName": "ruleNextPage",
  1099. "affinity": "TEXT"
  1100. },
  1101. {
  1102. "fieldPath": "ruleTitle",
  1103. "columnName": "ruleTitle",
  1104. "affinity": "TEXT"
  1105. },
  1106. {
  1107. "fieldPath": "rulePubDate",
  1108. "columnName": "rulePubDate",
  1109. "affinity": "TEXT"
  1110. },
  1111. {
  1112. "fieldPath": "ruleDescription",
  1113. "columnName": "ruleDescription",
  1114. "affinity": "TEXT"
  1115. },
  1116. {
  1117. "fieldPath": "ruleImage",
  1118. "columnName": "ruleImage",
  1119. "affinity": "TEXT"
  1120. },
  1121. {
  1122. "fieldPath": "ruleLink",
  1123. "columnName": "ruleLink",
  1124. "affinity": "TEXT"
  1125. },
  1126. {
  1127. "fieldPath": "ruleContent",
  1128. "columnName": "ruleContent",
  1129. "affinity": "TEXT"
  1130. },
  1131. {
  1132. "fieldPath": "contentWhitelist",
  1133. "columnName": "contentWhitelist",
  1134. "affinity": "TEXT"
  1135. },
  1136. {
  1137. "fieldPath": "contentBlacklist",
  1138. "columnName": "contentBlacklist",
  1139. "affinity": "TEXT"
  1140. },
  1141. {
  1142. "fieldPath": "shouldOverrideUrlLoading",
  1143. "columnName": "shouldOverrideUrlLoading",
  1144. "affinity": "TEXT"
  1145. },
  1146. {
  1147. "fieldPath": "style",
  1148. "columnName": "style",
  1149. "affinity": "TEXT"
  1150. },
  1151. {
  1152. "fieldPath": "enableJs",
  1153. "columnName": "enableJs",
  1154. "affinity": "INTEGER",
  1155. "notNull": true,
  1156. "defaultValue": "1"
  1157. },
  1158. {
  1159. "fieldPath": "loadWithBaseUrl",
  1160. "columnName": "loadWithBaseUrl",
  1161. "affinity": "INTEGER",
  1162. "notNull": true,
  1163. "defaultValue": "1"
  1164. },
  1165. {
  1166. "fieldPath": "injectJs",
  1167. "columnName": "injectJs",
  1168. "affinity": "TEXT"
  1169. },
  1170. {
  1171. "fieldPath": "preloadJs",
  1172. "columnName": "preloadJs",
  1173. "affinity": "TEXT"
  1174. },
  1175. {
  1176. "fieldPath": "startHtml",
  1177. "columnName": "startHtml",
  1178. "affinity": "TEXT"
  1179. },
  1180. {
  1181. "fieldPath": "startStyle",
  1182. "columnName": "startStyle",
  1183. "affinity": "TEXT"
  1184. },
  1185. {
  1186. "fieldPath": "startJs",
  1187. "columnName": "startJs",
  1188. "affinity": "TEXT"
  1189. },
  1190. {
  1191. "fieldPath": "showWebLog",
  1192. "columnName": "showWebLog",
  1193. "affinity": "INTEGER",
  1194. "notNull": true,
  1195. "defaultValue": "0"
  1196. },
  1197. {
  1198. "fieldPath": "lastUpdateTime",
  1199. "columnName": "lastUpdateTime",
  1200. "affinity": "INTEGER",
  1201. "notNull": true,
  1202. "defaultValue": "0"
  1203. },
  1204. {
  1205. "fieldPath": "customOrder",
  1206. "columnName": "customOrder",
  1207. "affinity": "INTEGER",
  1208. "notNull": true,
  1209. "defaultValue": "0"
  1210. },
  1211. {
  1212. "fieldPath": "type",
  1213. "columnName": "type",
  1214. "affinity": "INTEGER",
  1215. "notNull": true,
  1216. "defaultValue": "0"
  1217. },
  1218. {
  1219. "fieldPath": "preload",
  1220. "columnName": "preload",
  1221. "affinity": "INTEGER",
  1222. "notNull": true,
  1223. "defaultValue": "0"
  1224. },
  1225. {
  1226. "fieldPath": "cacheFirst",
  1227. "columnName": "cacheFirst",
  1228. "affinity": "INTEGER",
  1229. "notNull": true,
  1230. "defaultValue": "0"
  1231. },
  1232. {
  1233. "fieldPath": "searchUrl",
  1234. "columnName": "searchUrl",
  1235. "affinity": "TEXT"
  1236. },
  1237. {
  1238. "fieldPath": "redirectPolicy",
  1239. "columnName": "redirectPolicy",
  1240. "affinity": "TEXT",
  1241. "notNull": true,
  1242. "defaultValue": "'ASK_CROSS_ORIGIN'"
  1243. }
  1244. ],
  1245. "primaryKey": {
  1246. "autoGenerate": false,
  1247. "columnNames": [
  1248. "sourceUrl"
  1249. ]
  1250. },
  1251. "indices": [
  1252. {
  1253. "name": "index_rssSources_sourceUrl",
  1254. "unique": false,
  1255. "columnNames": [
  1256. "sourceUrl"
  1257. ],
  1258. "orders": [],
  1259. "createSql": "CREATE INDEX IF NOT EXISTS `index_rssSources_sourceUrl` ON `${TABLE_NAME}` (`sourceUrl`)"
  1260. }
  1261. ]
  1262. },
  1263. {
  1264. "tableName": "bookmarks",
  1265. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`time` INTEGER NOT NULL, `bookName` TEXT NOT NULL, `bookAuthor` TEXT NOT NULL DEFAULT '', `chapterIndex` INTEGER NOT NULL, `chapterPos` INTEGER NOT NULL, `chapterName` TEXT NOT NULL, `bookText` TEXT NOT NULL, `content` TEXT NOT NULL, PRIMARY KEY(`time`))",
  1266. "fields": [
  1267. {
  1268. "fieldPath": "time",
  1269. "columnName": "time",
  1270. "affinity": "INTEGER",
  1271. "notNull": true
  1272. },
  1273. {
  1274. "fieldPath": "bookName",
  1275. "columnName": "bookName",
  1276. "affinity": "TEXT",
  1277. "notNull": true
  1278. },
  1279. {
  1280. "fieldPath": "bookAuthor",
  1281. "columnName": "bookAuthor",
  1282. "affinity": "TEXT",
  1283. "notNull": true,
  1284. "defaultValue": "''"
  1285. },
  1286. {
  1287. "fieldPath": "chapterIndex",
  1288. "columnName": "chapterIndex",
  1289. "affinity": "INTEGER",
  1290. "notNull": true
  1291. },
  1292. {
  1293. "fieldPath": "chapterPos",
  1294. "columnName": "chapterPos",
  1295. "affinity": "INTEGER",
  1296. "notNull": true
  1297. },
  1298. {
  1299. "fieldPath": "chapterName",
  1300. "columnName": "chapterName",
  1301. "affinity": "TEXT",
  1302. "notNull": true
  1303. },
  1304. {
  1305. "fieldPath": "bookText",
  1306. "columnName": "bookText",
  1307. "affinity": "TEXT",
  1308. "notNull": true
  1309. },
  1310. {
  1311. "fieldPath": "content",
  1312. "columnName": "content",
  1313. "affinity": "TEXT",
  1314. "notNull": true
  1315. }
  1316. ],
  1317. "primaryKey": {
  1318. "autoGenerate": false,
  1319. "columnNames": [
  1320. "time"
  1321. ]
  1322. },
  1323. "indices": [
  1324. {
  1325. "name": "index_bookmarks_bookName_bookAuthor",
  1326. "unique": false,
  1327. "columnNames": [
  1328. "bookName",
  1329. "bookAuthor"
  1330. ],
  1331. "orders": [],
  1332. "createSql": "CREATE INDEX IF NOT EXISTS `index_bookmarks_bookName_bookAuthor` ON `${TABLE_NAME}` (`bookName`, `bookAuthor`)"
  1333. }
  1334. ]
  1335. },
  1336. {
  1337. "tableName": "rssArticles",
  1338. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`origin` TEXT NOT NULL, `sort` TEXT NOT NULL, `title` TEXT NOT NULL, `order` INTEGER NOT NULL, `link` TEXT NOT NULL, `pubDate` TEXT, `description` TEXT, `content` TEXT, `image` TEXT, `group` TEXT NOT NULL DEFAULT '默认分组', `read` INTEGER NOT NULL, `variable` TEXT, `type` INTEGER NOT NULL DEFAULT 0, `durPos` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`origin`, `link`, `sort`))",
  1339. "fields": [
  1340. {
  1341. "fieldPath": "origin",
  1342. "columnName": "origin",
  1343. "affinity": "TEXT",
  1344. "notNull": true
  1345. },
  1346. {
  1347. "fieldPath": "sort",
  1348. "columnName": "sort",
  1349. "affinity": "TEXT",
  1350. "notNull": true
  1351. },
  1352. {
  1353. "fieldPath": "title",
  1354. "columnName": "title",
  1355. "affinity": "TEXT",
  1356. "notNull": true
  1357. },
  1358. {
  1359. "fieldPath": "order",
  1360. "columnName": "order",
  1361. "affinity": "INTEGER",
  1362. "notNull": true
  1363. },
  1364. {
  1365. "fieldPath": "link",
  1366. "columnName": "link",
  1367. "affinity": "TEXT",
  1368. "notNull": true
  1369. },
  1370. {
  1371. "fieldPath": "pubDate",
  1372. "columnName": "pubDate",
  1373. "affinity": "TEXT"
  1374. },
  1375. {
  1376. "fieldPath": "description",
  1377. "columnName": "description",
  1378. "affinity": "TEXT"
  1379. },
  1380. {
  1381. "fieldPath": "content",
  1382. "columnName": "content",
  1383. "affinity": "TEXT"
  1384. },
  1385. {
  1386. "fieldPath": "image",
  1387. "columnName": "image",
  1388. "affinity": "TEXT"
  1389. },
  1390. {
  1391. "fieldPath": "group",
  1392. "columnName": "group",
  1393. "affinity": "TEXT",
  1394. "notNull": true,
  1395. "defaultValue": "'默认分组'"
  1396. },
  1397. {
  1398. "fieldPath": "read",
  1399. "columnName": "read",
  1400. "affinity": "INTEGER",
  1401. "notNull": true
  1402. },
  1403. {
  1404. "fieldPath": "variable",
  1405. "columnName": "variable",
  1406. "affinity": "TEXT"
  1407. },
  1408. {
  1409. "fieldPath": "type",
  1410. "columnName": "type",
  1411. "affinity": "INTEGER",
  1412. "notNull": true,
  1413. "defaultValue": "0"
  1414. },
  1415. {
  1416. "fieldPath": "durPos",
  1417. "columnName": "durPos",
  1418. "affinity": "INTEGER",
  1419. "notNull": true,
  1420. "defaultValue": "0"
  1421. }
  1422. ],
  1423. "primaryKey": {
  1424. "autoGenerate": false,
  1425. "columnNames": [
  1426. "origin",
  1427. "link",
  1428. "sort"
  1429. ]
  1430. }
  1431. },
  1432. {
  1433. "tableName": "rssReadRecords",
  1434. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`record` TEXT NOT NULL, `title` TEXT, `readTime` INTEGER, `read` INTEGER NOT NULL, `origin` TEXT NOT NULL DEFAULT '', `sort` TEXT NOT NULL DEFAULT '', `image` TEXT, `type` INTEGER NOT NULL DEFAULT 0, `durPos` INTEGER NOT NULL DEFAULT 0, `pubDate` TEXT, PRIMARY KEY(`record`))",
  1435. "fields": [
  1436. {
  1437. "fieldPath": "record",
  1438. "columnName": "record",
  1439. "affinity": "TEXT",
  1440. "notNull": true
  1441. },
  1442. {
  1443. "fieldPath": "title",
  1444. "columnName": "title",
  1445. "affinity": "TEXT"
  1446. },
  1447. {
  1448. "fieldPath": "readTime",
  1449. "columnName": "readTime",
  1450. "affinity": "INTEGER"
  1451. },
  1452. {
  1453. "fieldPath": "read",
  1454. "columnName": "read",
  1455. "affinity": "INTEGER",
  1456. "notNull": true
  1457. },
  1458. {
  1459. "fieldPath": "origin",
  1460. "columnName": "origin",
  1461. "affinity": "TEXT",
  1462. "notNull": true,
  1463. "defaultValue": "''"
  1464. },
  1465. {
  1466. "fieldPath": "sort",
  1467. "columnName": "sort",
  1468. "affinity": "TEXT",
  1469. "notNull": true,
  1470. "defaultValue": "''"
  1471. },
  1472. {
  1473. "fieldPath": "image",
  1474. "columnName": "image",
  1475. "affinity": "TEXT"
  1476. },
  1477. {
  1478. "fieldPath": "type",
  1479. "columnName": "type",
  1480. "affinity": "INTEGER",
  1481. "notNull": true,
  1482. "defaultValue": "0"
  1483. },
  1484. {
  1485. "fieldPath": "durPos",
  1486. "columnName": "durPos",
  1487. "affinity": "INTEGER",
  1488. "notNull": true,
  1489. "defaultValue": "0"
  1490. },
  1491. {
  1492. "fieldPath": "pubDate",
  1493. "columnName": "pubDate",
  1494. "affinity": "TEXT"
  1495. }
  1496. ],
  1497. "primaryKey": {
  1498. "autoGenerate": false,
  1499. "columnNames": [
  1500. "record"
  1501. ]
  1502. },
  1503. "indices": [
  1504. {
  1505. "name": "index_rssReadRecords_origin",
  1506. "unique": false,
  1507. "columnNames": [
  1508. "origin"
  1509. ],
  1510. "orders": [],
  1511. "createSql": "CREATE INDEX IF NOT EXISTS `index_rssReadRecords_origin` ON `${TABLE_NAME}` (`origin`)"
  1512. }
  1513. ]
  1514. },
  1515. {
  1516. "tableName": "readRecordDetail",
  1517. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`deviceId` TEXT NOT NULL, `bookName` TEXT NOT NULL, `bookAuthor` TEXT NOT NULL DEFAULT '', `date` TEXT NOT NULL, `readTime` INTEGER NOT NULL DEFAULT 0, `readWords` INTEGER NOT NULL DEFAULT 0, `firstReadTime` INTEGER NOT NULL DEFAULT 0, `lastReadTime` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`deviceId`, `bookName`, `bookAuthor`, `date`))",
  1518. "fields": [
  1519. {
  1520. "fieldPath": "deviceId",
  1521. "columnName": "deviceId",
  1522. "affinity": "TEXT",
  1523. "notNull": true
  1524. },
  1525. {
  1526. "fieldPath": "bookName",
  1527. "columnName": "bookName",
  1528. "affinity": "TEXT",
  1529. "notNull": true
  1530. },
  1531. {
  1532. "fieldPath": "bookAuthor",
  1533. "columnName": "bookAuthor",
  1534. "affinity": "TEXT",
  1535. "notNull": true,
  1536. "defaultValue": "''"
  1537. },
  1538. {
  1539. "fieldPath": "date",
  1540. "columnName": "date",
  1541. "affinity": "TEXT",
  1542. "notNull": true
  1543. },
  1544. {
  1545. "fieldPath": "readTime",
  1546. "columnName": "readTime",
  1547. "affinity": "INTEGER",
  1548. "notNull": true,
  1549. "defaultValue": "0"
  1550. },
  1551. {
  1552. "fieldPath": "readWords",
  1553. "columnName": "readWords",
  1554. "affinity": "INTEGER",
  1555. "notNull": true,
  1556. "defaultValue": "0"
  1557. },
  1558. {
  1559. "fieldPath": "firstReadTime",
  1560. "columnName": "firstReadTime",
  1561. "affinity": "INTEGER",
  1562. "notNull": true,
  1563. "defaultValue": "0"
  1564. },
  1565. {
  1566. "fieldPath": "lastReadTime",
  1567. "columnName": "lastReadTime",
  1568. "affinity": "INTEGER",
  1569. "notNull": true,
  1570. "defaultValue": "0"
  1571. }
  1572. ],
  1573. "primaryKey": {
  1574. "autoGenerate": false,
  1575. "columnNames": [
  1576. "deviceId",
  1577. "bookName",
  1578. "bookAuthor",
  1579. "date"
  1580. ]
  1581. }
  1582. },
  1583. {
  1584. "tableName": "readRecordSession",
  1585. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `deviceId` TEXT NOT NULL, `bookName` TEXT NOT NULL, `bookAuthor` TEXT NOT NULL DEFAULT '', `startTime` INTEGER NOT NULL, `endTime` INTEGER NOT NULL, `words` INTEGER NOT NULL)",
  1586. "fields": [
  1587. {
  1588. "fieldPath": "id",
  1589. "columnName": "id",
  1590. "affinity": "INTEGER",
  1591. "notNull": true
  1592. },
  1593. {
  1594. "fieldPath": "deviceId",
  1595. "columnName": "deviceId",
  1596. "affinity": "TEXT",
  1597. "notNull": true
  1598. },
  1599. {
  1600. "fieldPath": "bookName",
  1601. "columnName": "bookName",
  1602. "affinity": "TEXT",
  1603. "notNull": true
  1604. },
  1605. {
  1606. "fieldPath": "bookAuthor",
  1607. "columnName": "bookAuthor",
  1608. "affinity": "TEXT",
  1609. "notNull": true,
  1610. "defaultValue": "''"
  1611. },
  1612. {
  1613. "fieldPath": "startTime",
  1614. "columnName": "startTime",
  1615. "affinity": "INTEGER",
  1616. "notNull": true
  1617. },
  1618. {
  1619. "fieldPath": "endTime",
  1620. "columnName": "endTime",
  1621. "affinity": "INTEGER",
  1622. "notNull": true
  1623. },
  1624. {
  1625. "fieldPath": "words",
  1626. "columnName": "words",
  1627. "affinity": "INTEGER",
  1628. "notNull": true
  1629. }
  1630. ],
  1631. "primaryKey": {
  1632. "autoGenerate": true,
  1633. "columnNames": [
  1634. "id"
  1635. ]
  1636. }
  1637. },
  1638. {
  1639. "tableName": "rssStars",
  1640. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`origin` TEXT NOT NULL, `sort` TEXT NOT NULL, `title` TEXT NOT NULL, `starTime` INTEGER NOT NULL, `link` TEXT NOT NULL, `pubDate` TEXT, `description` TEXT, `content` TEXT, `image` TEXT, `group` TEXT NOT NULL DEFAULT '默认分组', `variable` TEXT, `type` INTEGER NOT NULL DEFAULT 0, `durPos` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`origin`, `link`))",
  1641. "fields": [
  1642. {
  1643. "fieldPath": "origin",
  1644. "columnName": "origin",
  1645. "affinity": "TEXT",
  1646. "notNull": true
  1647. },
  1648. {
  1649. "fieldPath": "sort",
  1650. "columnName": "sort",
  1651. "affinity": "TEXT",
  1652. "notNull": true
  1653. },
  1654. {
  1655. "fieldPath": "title",
  1656. "columnName": "title",
  1657. "affinity": "TEXT",
  1658. "notNull": true
  1659. },
  1660. {
  1661. "fieldPath": "starTime",
  1662. "columnName": "starTime",
  1663. "affinity": "INTEGER",
  1664. "notNull": true
  1665. },
  1666. {
  1667. "fieldPath": "link",
  1668. "columnName": "link",
  1669. "affinity": "TEXT",
  1670. "notNull": true
  1671. },
  1672. {
  1673. "fieldPath": "pubDate",
  1674. "columnName": "pubDate",
  1675. "affinity": "TEXT"
  1676. },
  1677. {
  1678. "fieldPath": "description",
  1679. "columnName": "description",
  1680. "affinity": "TEXT"
  1681. },
  1682. {
  1683. "fieldPath": "content",
  1684. "columnName": "content",
  1685. "affinity": "TEXT"
  1686. },
  1687. {
  1688. "fieldPath": "image",
  1689. "columnName": "image",
  1690. "affinity": "TEXT"
  1691. },
  1692. {
  1693. "fieldPath": "group",
  1694. "columnName": "group",
  1695. "affinity": "TEXT",
  1696. "notNull": true,
  1697. "defaultValue": "'默认分组'"
  1698. },
  1699. {
  1700. "fieldPath": "variable",
  1701. "columnName": "variable",
  1702. "affinity": "TEXT"
  1703. },
  1704. {
  1705. "fieldPath": "type",
  1706. "columnName": "type",
  1707. "affinity": "INTEGER",
  1708. "notNull": true,
  1709. "defaultValue": "0"
  1710. },
  1711. {
  1712. "fieldPath": "durPos",
  1713. "columnName": "durPos",
  1714. "affinity": "INTEGER",
  1715. "notNull": true,
  1716. "defaultValue": "0"
  1717. }
  1718. ],
  1719. "primaryKey": {
  1720. "autoGenerate": false,
  1721. "columnNames": [
  1722. "origin",
  1723. "link"
  1724. ]
  1725. }
  1726. },
  1727. {
  1728. "tableName": "txtTocRules",
  1729. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `chapterRule` TEXT NOT NULL, `volumeRule` TEXT NOT NULL, `example` TEXT, `serialNumber` INTEGER NOT NULL, `enable` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  1730. "fields": [
  1731. {
  1732. "fieldPath": "id",
  1733. "columnName": "id",
  1734. "affinity": "INTEGER",
  1735. "notNull": true
  1736. },
  1737. {
  1738. "fieldPath": "name",
  1739. "columnName": "name",
  1740. "affinity": "TEXT",
  1741. "notNull": true
  1742. },
  1743. {
  1744. "fieldPath": "chapterRule",
  1745. "columnName": "chapterRule",
  1746. "affinity": "TEXT",
  1747. "notNull": true
  1748. },
  1749. {
  1750. "fieldPath": "volumeRule",
  1751. "columnName": "volumeRule",
  1752. "affinity": "TEXT",
  1753. "notNull": true
  1754. },
  1755. {
  1756. "fieldPath": "example",
  1757. "columnName": "example",
  1758. "affinity": "TEXT"
  1759. },
  1760. {
  1761. "fieldPath": "serialNumber",
  1762. "columnName": "serialNumber",
  1763. "affinity": "INTEGER",
  1764. "notNull": true
  1765. },
  1766. {
  1767. "fieldPath": "enable",
  1768. "columnName": "enable",
  1769. "affinity": "INTEGER",
  1770. "notNull": true
  1771. }
  1772. ],
  1773. "primaryKey": {
  1774. "autoGenerate": false,
  1775. "columnNames": [
  1776. "id"
  1777. ]
  1778. }
  1779. },
  1780. {
  1781. "tableName": "readRecord",
  1782. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`deviceId` TEXT NOT NULL, `bookName` TEXT NOT NULL, `bookAuthor` TEXT NOT NULL DEFAULT '', `readTime` INTEGER NOT NULL DEFAULT 0, `lastRead` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`deviceId`, `bookName`, `bookAuthor`))",
  1783. "fields": [
  1784. {
  1785. "fieldPath": "deviceId",
  1786. "columnName": "deviceId",
  1787. "affinity": "TEXT",
  1788. "notNull": true
  1789. },
  1790. {
  1791. "fieldPath": "bookName",
  1792. "columnName": "bookName",
  1793. "affinity": "TEXT",
  1794. "notNull": true
  1795. },
  1796. {
  1797. "fieldPath": "bookAuthor",
  1798. "columnName": "bookAuthor",
  1799. "affinity": "TEXT",
  1800. "notNull": true,
  1801. "defaultValue": "''"
  1802. },
  1803. {
  1804. "fieldPath": "readTime",
  1805. "columnName": "readTime",
  1806. "affinity": "INTEGER",
  1807. "notNull": true,
  1808. "defaultValue": "0"
  1809. },
  1810. {
  1811. "fieldPath": "lastRead",
  1812. "columnName": "lastRead",
  1813. "affinity": "INTEGER",
  1814. "notNull": true,
  1815. "defaultValue": "0"
  1816. }
  1817. ],
  1818. "primaryKey": {
  1819. "autoGenerate": false,
  1820. "columnNames": [
  1821. "deviceId",
  1822. "bookName",
  1823. "bookAuthor"
  1824. ]
  1825. }
  1826. },
  1827. {
  1828. "tableName": "httpTTS",
  1829. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `url` TEXT NOT NULL, `contentType` TEXT, `concurrentRate` TEXT DEFAULT '0', `loginUrl` TEXT, `loginUi` TEXT, `header` TEXT, `jsLib` TEXT, `enabledCookieJar` INTEGER DEFAULT 0, `loginCheckJs` TEXT, `lastUpdateTime` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`))",
  1830. "fields": [
  1831. {
  1832. "fieldPath": "id",
  1833. "columnName": "id",
  1834. "affinity": "INTEGER",
  1835. "notNull": true
  1836. },
  1837. {
  1838. "fieldPath": "name",
  1839. "columnName": "name",
  1840. "affinity": "TEXT",
  1841. "notNull": true
  1842. },
  1843. {
  1844. "fieldPath": "url",
  1845. "columnName": "url",
  1846. "affinity": "TEXT",
  1847. "notNull": true
  1848. },
  1849. {
  1850. "fieldPath": "contentType",
  1851. "columnName": "contentType",
  1852. "affinity": "TEXT"
  1853. },
  1854. {
  1855. "fieldPath": "concurrentRate",
  1856. "columnName": "concurrentRate",
  1857. "affinity": "TEXT",
  1858. "defaultValue": "'0'"
  1859. },
  1860. {
  1861. "fieldPath": "loginUrl",
  1862. "columnName": "loginUrl",
  1863. "affinity": "TEXT"
  1864. },
  1865. {
  1866. "fieldPath": "loginUi",
  1867. "columnName": "loginUi",
  1868. "affinity": "TEXT"
  1869. },
  1870. {
  1871. "fieldPath": "header",
  1872. "columnName": "header",
  1873. "affinity": "TEXT"
  1874. },
  1875. {
  1876. "fieldPath": "jsLib",
  1877. "columnName": "jsLib",
  1878. "affinity": "TEXT"
  1879. },
  1880. {
  1881. "fieldPath": "enabledCookieJar",
  1882. "columnName": "enabledCookieJar",
  1883. "affinity": "INTEGER",
  1884. "defaultValue": "0"
  1885. },
  1886. {
  1887. "fieldPath": "loginCheckJs",
  1888. "columnName": "loginCheckJs",
  1889. "affinity": "TEXT"
  1890. },
  1891. {
  1892. "fieldPath": "lastUpdateTime",
  1893. "columnName": "lastUpdateTime",
  1894. "affinity": "INTEGER",
  1895. "notNull": true,
  1896. "defaultValue": "0"
  1897. }
  1898. ],
  1899. "primaryKey": {
  1900. "autoGenerate": false,
  1901. "columnNames": [
  1902. "id"
  1903. ]
  1904. }
  1905. },
  1906. {
  1907. "tableName": "caches",
  1908. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `value` TEXT, `deadline` INTEGER NOT NULL, PRIMARY KEY(`key`))",
  1909. "fields": [
  1910. {
  1911. "fieldPath": "key",
  1912. "columnName": "key",
  1913. "affinity": "TEXT",
  1914. "notNull": true
  1915. },
  1916. {
  1917. "fieldPath": "value",
  1918. "columnName": "value",
  1919. "affinity": "TEXT"
  1920. },
  1921. {
  1922. "fieldPath": "deadline",
  1923. "columnName": "deadline",
  1924. "affinity": "INTEGER",
  1925. "notNull": true
  1926. }
  1927. ],
  1928. "primaryKey": {
  1929. "autoGenerate": false,
  1930. "columnNames": [
  1931. "key"
  1932. ]
  1933. },
  1934. "indices": [
  1935. {
  1936. "name": "index_caches_key",
  1937. "unique": true,
  1938. "columnNames": [
  1939. "key"
  1940. ],
  1941. "orders": [],
  1942. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_caches_key` ON `${TABLE_NAME}` (`key`)"
  1943. }
  1944. ]
  1945. },
  1946. {
  1947. "tableName": "ruleSubs",
  1948. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `url` TEXT NOT NULL, `type` INTEGER NOT NULL, `customOrder` INTEGER NOT NULL, `autoUpdate` INTEGER NOT NULL, `update` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  1949. "fields": [
  1950. {
  1951. "fieldPath": "id",
  1952. "columnName": "id",
  1953. "affinity": "INTEGER",
  1954. "notNull": true
  1955. },
  1956. {
  1957. "fieldPath": "name",
  1958. "columnName": "name",
  1959. "affinity": "TEXT",
  1960. "notNull": true
  1961. },
  1962. {
  1963. "fieldPath": "url",
  1964. "columnName": "url",
  1965. "affinity": "TEXT",
  1966. "notNull": true
  1967. },
  1968. {
  1969. "fieldPath": "type",
  1970. "columnName": "type",
  1971. "affinity": "INTEGER",
  1972. "notNull": true
  1973. },
  1974. {
  1975. "fieldPath": "customOrder",
  1976. "columnName": "customOrder",
  1977. "affinity": "INTEGER",
  1978. "notNull": true
  1979. },
  1980. {
  1981. "fieldPath": "autoUpdate",
  1982. "columnName": "autoUpdate",
  1983. "affinity": "INTEGER",
  1984. "notNull": true
  1985. },
  1986. {
  1987. "fieldPath": "update",
  1988. "columnName": "update",
  1989. "affinity": "INTEGER",
  1990. "notNull": true
  1991. }
  1992. ],
  1993. "primaryKey": {
  1994. "autoGenerate": false,
  1995. "columnNames": [
  1996. "id"
  1997. ]
  1998. }
  1999. },
  2000. {
  2001. "tableName": "dictRules",
  2002. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `urlRule` TEXT NOT NULL, `showRule` TEXT NOT NULL, `enabled` INTEGER NOT NULL DEFAULT 1, `sortNumber` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))",
  2003. "fields": [
  2004. {
  2005. "fieldPath": "name",
  2006. "columnName": "name",
  2007. "affinity": "TEXT",
  2008. "notNull": true
  2009. },
  2010. {
  2011. "fieldPath": "urlRule",
  2012. "columnName": "urlRule",
  2013. "affinity": "TEXT",
  2014. "notNull": true
  2015. },
  2016. {
  2017. "fieldPath": "showRule",
  2018. "columnName": "showRule",
  2019. "affinity": "TEXT",
  2020. "notNull": true
  2021. },
  2022. {
  2023. "fieldPath": "enabled",
  2024. "columnName": "enabled",
  2025. "affinity": "INTEGER",
  2026. "notNull": true,
  2027. "defaultValue": "1"
  2028. },
  2029. {
  2030. "fieldPath": "sortNumber",
  2031. "columnName": "sortNumber",
  2032. "affinity": "INTEGER",
  2033. "notNull": true,
  2034. "defaultValue": "0"
  2035. }
  2036. ],
  2037. "primaryKey": {
  2038. "autoGenerate": false,
  2039. "columnNames": [
  2040. "name"
  2041. ]
  2042. }
  2043. },
  2044. {
  2045. "tableName": "keyboardAssists",
  2046. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`type` INTEGER NOT NULL DEFAULT 0, `key` TEXT NOT NULL DEFAULT '', `value` TEXT NOT NULL DEFAULT '', `serialNo` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`type`, `key`))",
  2047. "fields": [
  2048. {
  2049. "fieldPath": "type",
  2050. "columnName": "type",
  2051. "affinity": "INTEGER",
  2052. "notNull": true,
  2053. "defaultValue": "0"
  2054. },
  2055. {
  2056. "fieldPath": "key",
  2057. "columnName": "key",
  2058. "affinity": "TEXT",
  2059. "notNull": true,
  2060. "defaultValue": "''"
  2061. },
  2062. {
  2063. "fieldPath": "value",
  2064. "columnName": "value",
  2065. "affinity": "TEXT",
  2066. "notNull": true,
  2067. "defaultValue": "''"
  2068. },
  2069. {
  2070. "fieldPath": "serialNo",
  2071. "columnName": "serialNo",
  2072. "affinity": "INTEGER",
  2073. "notNull": true,
  2074. "defaultValue": "0"
  2075. }
  2076. ],
  2077. "primaryKey": {
  2078. "autoGenerate": false,
  2079. "columnNames": [
  2080. "type",
  2081. "key"
  2082. ]
  2083. }
  2084. },
  2085. {
  2086. "tableName": "servers",
  2087. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `config` TEXT, `sortNumber` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2088. "fields": [
  2089. {
  2090. "fieldPath": "id",
  2091. "columnName": "id",
  2092. "affinity": "INTEGER",
  2093. "notNull": true
  2094. },
  2095. {
  2096. "fieldPath": "name",
  2097. "columnName": "name",
  2098. "affinity": "TEXT",
  2099. "notNull": true
  2100. },
  2101. {
  2102. "fieldPath": "type",
  2103. "columnName": "type",
  2104. "affinity": "TEXT",
  2105. "notNull": true
  2106. },
  2107. {
  2108. "fieldPath": "config",
  2109. "columnName": "config",
  2110. "affinity": "TEXT"
  2111. },
  2112. {
  2113. "fieldPath": "sortNumber",
  2114. "columnName": "sortNumber",
  2115. "affinity": "INTEGER",
  2116. "notNull": true
  2117. }
  2118. ],
  2119. "primaryKey": {
  2120. "autoGenerate": false,
  2121. "columnNames": [
  2122. "id"
  2123. ]
  2124. }
  2125. },
  2126. {
  2127. "tableName": "search_content_history",
  2128. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `bookName` TEXT DEFAULT '', `bookAuthor` TEXT DEFAULT '', `query` TEXT NOT NULL, `time` INTEGER NOT NULL)",
  2129. "fields": [
  2130. {
  2131. "fieldPath": "id",
  2132. "columnName": "id",
  2133. "affinity": "INTEGER",
  2134. "notNull": true
  2135. },
  2136. {
  2137. "fieldPath": "bookName",
  2138. "columnName": "bookName",
  2139. "affinity": "TEXT",
  2140. "defaultValue": "''"
  2141. },
  2142. {
  2143. "fieldPath": "bookAuthor",
  2144. "columnName": "bookAuthor",
  2145. "affinity": "TEXT",
  2146. "defaultValue": "''"
  2147. },
  2148. {
  2149. "fieldPath": "query",
  2150. "columnName": "query",
  2151. "affinity": "TEXT",
  2152. "notNull": true
  2153. },
  2154. {
  2155. "fieldPath": "time",
  2156. "columnName": "time",
  2157. "affinity": "INTEGER",
  2158. "notNull": true
  2159. }
  2160. ],
  2161. "primaryKey": {
  2162. "autoGenerate": true,
  2163. "columnNames": [
  2164. "id"
  2165. ]
  2166. },
  2167. "indices": [
  2168. {
  2169. "name": "index_search_content_history_bookName_bookAuthor_query",
  2170. "unique": true,
  2171. "columnNames": [
  2172. "bookName",
  2173. "bookAuthor",
  2174. "query"
  2175. ],
  2176. "orders": [],
  2177. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_content_history_bookName_bookAuthor_query` ON `${TABLE_NAME}` (`bookName`, `bookAuthor`, `query`)"
  2178. }
  2179. ]
  2180. },
  2181. {
  2182. "tableName": "homepage_modules",
  2183. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `sourceUrl` TEXT NOT NULL, `moduleKey` TEXT NOT NULL, `type` TEXT NOT NULL, `title` TEXT NOT NULL, `args` TEXT, `layoutConfig` TEXT, `url` TEXT, `isEnabled` INTEGER NOT NULL, `sortOrder` INTEGER NOT NULL, `customSetId` TEXT, `isUserCreated` INTEGER NOT NULL, `customTitle` TEXT, `customSetTitle` TEXT, `sourceJsonHash` TEXT, `syncedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2184. "fields": [
  2185. {
  2186. "fieldPath": "id",
  2187. "columnName": "id",
  2188. "affinity": "TEXT",
  2189. "notNull": true
  2190. },
  2191. {
  2192. "fieldPath": "sourceUrl",
  2193. "columnName": "sourceUrl",
  2194. "affinity": "TEXT",
  2195. "notNull": true
  2196. },
  2197. {
  2198. "fieldPath": "moduleKey",
  2199. "columnName": "moduleKey",
  2200. "affinity": "TEXT",
  2201. "notNull": true
  2202. },
  2203. {
  2204. "fieldPath": "type",
  2205. "columnName": "type",
  2206. "affinity": "TEXT",
  2207. "notNull": true
  2208. },
  2209. {
  2210. "fieldPath": "title",
  2211. "columnName": "title",
  2212. "affinity": "TEXT",
  2213. "notNull": true
  2214. },
  2215. {
  2216. "fieldPath": "args",
  2217. "columnName": "args",
  2218. "affinity": "TEXT"
  2219. },
  2220. {
  2221. "fieldPath": "layoutConfig",
  2222. "columnName": "layoutConfig",
  2223. "affinity": "TEXT"
  2224. },
  2225. {
  2226. "fieldPath": "url",
  2227. "columnName": "url",
  2228. "affinity": "TEXT"
  2229. },
  2230. {
  2231. "fieldPath": "isEnabled",
  2232. "columnName": "isEnabled",
  2233. "affinity": "INTEGER",
  2234. "notNull": true
  2235. },
  2236. {
  2237. "fieldPath": "sortOrder",
  2238. "columnName": "sortOrder",
  2239. "affinity": "INTEGER",
  2240. "notNull": true
  2241. },
  2242. {
  2243. "fieldPath": "customSetId",
  2244. "columnName": "customSetId",
  2245. "affinity": "TEXT"
  2246. },
  2247. {
  2248. "fieldPath": "isUserCreated",
  2249. "columnName": "isUserCreated",
  2250. "affinity": "INTEGER",
  2251. "notNull": true
  2252. },
  2253. {
  2254. "fieldPath": "customTitle",
  2255. "columnName": "customTitle",
  2256. "affinity": "TEXT"
  2257. },
  2258. {
  2259. "fieldPath": "customSetTitle",
  2260. "columnName": "customSetTitle",
  2261. "affinity": "TEXT"
  2262. },
  2263. {
  2264. "fieldPath": "sourceJsonHash",
  2265. "columnName": "sourceJsonHash",
  2266. "affinity": "TEXT"
  2267. },
  2268. {
  2269. "fieldPath": "syncedAt",
  2270. "columnName": "syncedAt",
  2271. "affinity": "INTEGER",
  2272. "notNull": true
  2273. }
  2274. ],
  2275. "primaryKey": {
  2276. "autoGenerate": false,
  2277. "columnNames": [
  2278. "id"
  2279. ]
  2280. }
  2281. },
  2282. {
  2283. "tableName": "homepage_custom_sets",
  2284. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `sortOrder` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2285. "fields": [
  2286. {
  2287. "fieldPath": "id",
  2288. "columnName": "id",
  2289. "affinity": "TEXT",
  2290. "notNull": true
  2291. },
  2292. {
  2293. "fieldPath": "name",
  2294. "columnName": "name",
  2295. "affinity": "TEXT",
  2296. "notNull": true
  2297. },
  2298. {
  2299. "fieldPath": "sortOrder",
  2300. "columnName": "sortOrder",
  2301. "affinity": "INTEGER",
  2302. "notNull": true
  2303. }
  2304. ],
  2305. "primaryKey": {
  2306. "autoGenerate": false,
  2307. "columnNames": [
  2308. "id"
  2309. ]
  2310. }
  2311. },
  2312. {
  2313. "tableName": "highlightRules",
  2314. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `pattern` TEXT NOT NULL, `sampleText` TEXT NOT NULL, `targetScope` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `position` INTEGER NOT NULL, `textColor` INTEGER, `bgColor` INTEGER, `underlineMode` INTEGER NOT NULL, `underlineColor` INTEGER, `underlineWidth` REAL NOT NULL, `underlineOffset` REAL NOT NULL, `underlineSvgPath` TEXT, `bgImage` TEXT, `bgImageFit` INTEGER NOT NULL, `bgImageScale` REAL NOT NULL, `configName` TEXT, `fontPath` TEXT, `fontWeight` INTEGER NOT NULL, `isItalic` INTEGER NOT NULL, `fontSizeOffset` INTEGER NOT NULL, `npLeft` REAL NOT NULL, `npRight` REAL NOT NULL, `npTop` REAL NOT NULL, `npBottom` REAL NOT NULL, PRIMARY KEY(`id`))",
  2315. "fields": [
  2316. {
  2317. "fieldPath": "id",
  2318. "columnName": "id",
  2319. "affinity": "TEXT",
  2320. "notNull": true
  2321. },
  2322. {
  2323. "fieldPath": "name",
  2324. "columnName": "name",
  2325. "affinity": "TEXT",
  2326. "notNull": true
  2327. },
  2328. {
  2329. "fieldPath": "pattern",
  2330. "columnName": "pattern",
  2331. "affinity": "TEXT",
  2332. "notNull": true
  2333. },
  2334. {
  2335. "fieldPath": "sampleText",
  2336. "columnName": "sampleText",
  2337. "affinity": "TEXT",
  2338. "notNull": true
  2339. },
  2340. {
  2341. "fieldPath": "targetScope",
  2342. "columnName": "targetScope",
  2343. "affinity": "INTEGER",
  2344. "notNull": true
  2345. },
  2346. {
  2347. "fieldPath": "enabled",
  2348. "columnName": "enabled",
  2349. "affinity": "INTEGER",
  2350. "notNull": true
  2351. },
  2352. {
  2353. "fieldPath": "position",
  2354. "columnName": "position",
  2355. "affinity": "INTEGER",
  2356. "notNull": true
  2357. },
  2358. {
  2359. "fieldPath": "textColor",
  2360. "columnName": "textColor",
  2361. "affinity": "INTEGER"
  2362. },
  2363. {
  2364. "fieldPath": "bgColor",
  2365. "columnName": "bgColor",
  2366. "affinity": "INTEGER"
  2367. },
  2368. {
  2369. "fieldPath": "underlineMode",
  2370. "columnName": "underlineMode",
  2371. "affinity": "INTEGER",
  2372. "notNull": true
  2373. },
  2374. {
  2375. "fieldPath": "underlineColor",
  2376. "columnName": "underlineColor",
  2377. "affinity": "INTEGER"
  2378. },
  2379. {
  2380. "fieldPath": "underlineWidth",
  2381. "columnName": "underlineWidth",
  2382. "affinity": "REAL",
  2383. "notNull": true
  2384. },
  2385. {
  2386. "fieldPath": "underlineOffset",
  2387. "columnName": "underlineOffset",
  2388. "affinity": "REAL",
  2389. "notNull": true
  2390. },
  2391. {
  2392. "fieldPath": "underlineSvgPath",
  2393. "columnName": "underlineSvgPath",
  2394. "affinity": "TEXT"
  2395. },
  2396. {
  2397. "fieldPath": "bgImage",
  2398. "columnName": "bgImage",
  2399. "affinity": "TEXT"
  2400. },
  2401. {
  2402. "fieldPath": "bgImageFit",
  2403. "columnName": "bgImageFit",
  2404. "affinity": "INTEGER",
  2405. "notNull": true
  2406. },
  2407. {
  2408. "fieldPath": "bgImageScale",
  2409. "columnName": "bgImageScale",
  2410. "affinity": "REAL",
  2411. "notNull": true
  2412. },
  2413. {
  2414. "fieldPath": "configName",
  2415. "columnName": "configName",
  2416. "affinity": "TEXT"
  2417. },
  2418. {
  2419. "fieldPath": "fontPath",
  2420. "columnName": "fontPath",
  2421. "affinity": "TEXT"
  2422. },
  2423. {
  2424. "fieldPath": "fontWeight",
  2425. "columnName": "fontWeight",
  2426. "affinity": "INTEGER",
  2427. "notNull": true
  2428. },
  2429. {
  2430. "fieldPath": "isItalic",
  2431. "columnName": "isItalic",
  2432. "affinity": "INTEGER",
  2433. "notNull": true
  2434. },
  2435. {
  2436. "fieldPath": "fontSizeOffset",
  2437. "columnName": "fontSizeOffset",
  2438. "affinity": "INTEGER",
  2439. "notNull": true
  2440. },
  2441. {
  2442. "fieldPath": "npLeft",
  2443. "columnName": "npLeft",
  2444. "affinity": "REAL",
  2445. "notNull": true
  2446. },
  2447. {
  2448. "fieldPath": "npRight",
  2449. "columnName": "npRight",
  2450. "affinity": "REAL",
  2451. "notNull": true
  2452. },
  2453. {
  2454. "fieldPath": "npTop",
  2455. "columnName": "npTop",
  2456. "affinity": "REAL",
  2457. "notNull": true
  2458. },
  2459. {
  2460. "fieldPath": "npBottom",
  2461. "columnName": "npBottom",
  2462. "affinity": "REAL",
  2463. "notNull": true
  2464. }
  2465. ],
  2466. "primaryKey": {
  2467. "autoGenerate": false,
  2468. "columnNames": [
  2469. "id"
  2470. ]
  2471. }
  2472. },
  2473. {
  2474. "tableName": "ai_provider_profiles",
  2475. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `protocol` TEXT NOT NULL, `baseUrl` TEXT NOT NULL, `modelsUrl` TEXT, `apiKey` TEXT NOT NULL, `authType` TEXT NOT NULL, `secretRef` TEXT, `headersJson` TEXT, `chatPath` TEXT, `responsesPath` TEXT, `messagesPath` TEXT, `modelsPath` TEXT, `customHeadersJson` TEXT, `enabled` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2476. "fields": [
  2477. {
  2478. "fieldPath": "id",
  2479. "columnName": "id",
  2480. "affinity": "TEXT",
  2481. "notNull": true
  2482. },
  2483. {
  2484. "fieldPath": "name",
  2485. "columnName": "name",
  2486. "affinity": "TEXT",
  2487. "notNull": true
  2488. },
  2489. {
  2490. "fieldPath": "protocol",
  2491. "columnName": "protocol",
  2492. "affinity": "TEXT",
  2493. "notNull": true
  2494. },
  2495. {
  2496. "fieldPath": "baseUrl",
  2497. "columnName": "baseUrl",
  2498. "affinity": "TEXT",
  2499. "notNull": true
  2500. },
  2501. {
  2502. "fieldPath": "modelsUrl",
  2503. "columnName": "modelsUrl",
  2504. "affinity": "TEXT"
  2505. },
  2506. {
  2507. "fieldPath": "apiKey",
  2508. "columnName": "apiKey",
  2509. "affinity": "TEXT",
  2510. "notNull": true
  2511. },
  2512. {
  2513. "fieldPath": "authType",
  2514. "columnName": "authType",
  2515. "affinity": "TEXT",
  2516. "notNull": true
  2517. },
  2518. {
  2519. "fieldPath": "secretRef",
  2520. "columnName": "secretRef",
  2521. "affinity": "TEXT"
  2522. },
  2523. {
  2524. "fieldPath": "headersJson",
  2525. "columnName": "headersJson",
  2526. "affinity": "TEXT"
  2527. },
  2528. {
  2529. "fieldPath": "chatPath",
  2530. "columnName": "chatPath",
  2531. "affinity": "TEXT"
  2532. },
  2533. {
  2534. "fieldPath": "responsesPath",
  2535. "columnName": "responsesPath",
  2536. "affinity": "TEXT"
  2537. },
  2538. {
  2539. "fieldPath": "messagesPath",
  2540. "columnName": "messagesPath",
  2541. "affinity": "TEXT"
  2542. },
  2543. {
  2544. "fieldPath": "modelsPath",
  2545. "columnName": "modelsPath",
  2546. "affinity": "TEXT"
  2547. },
  2548. {
  2549. "fieldPath": "customHeadersJson",
  2550. "columnName": "customHeadersJson",
  2551. "affinity": "TEXT"
  2552. },
  2553. {
  2554. "fieldPath": "enabled",
  2555. "columnName": "enabled",
  2556. "affinity": "INTEGER",
  2557. "notNull": true
  2558. },
  2559. {
  2560. "fieldPath": "createdAt",
  2561. "columnName": "createdAt",
  2562. "affinity": "INTEGER",
  2563. "notNull": true
  2564. },
  2565. {
  2566. "fieldPath": "updatedAt",
  2567. "columnName": "updatedAt",
  2568. "affinity": "INTEGER",
  2569. "notNull": true
  2570. }
  2571. ],
  2572. "primaryKey": {
  2573. "autoGenerate": false,
  2574. "columnNames": [
  2575. "id"
  2576. ]
  2577. }
  2578. },
  2579. {
  2580. "tableName": "ai_model_profiles",
  2581. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `providerId` TEXT NOT NULL, `displayName` TEXT NOT NULL, `modelId` TEXT NOT NULL, `contextWindow` INTEGER NOT NULL, `maxOutputTokens` INTEGER NOT NULL, `capabilities` TEXT NOT NULL, `defaultParamsJson` TEXT, `enabled` INTEGER NOT NULL, `sortNumber` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2582. "fields": [
  2583. {
  2584. "fieldPath": "id",
  2585. "columnName": "id",
  2586. "affinity": "TEXT",
  2587. "notNull": true
  2588. },
  2589. {
  2590. "fieldPath": "providerId",
  2591. "columnName": "providerId",
  2592. "affinity": "TEXT",
  2593. "notNull": true
  2594. },
  2595. {
  2596. "fieldPath": "displayName",
  2597. "columnName": "displayName",
  2598. "affinity": "TEXT",
  2599. "notNull": true
  2600. },
  2601. {
  2602. "fieldPath": "modelId",
  2603. "columnName": "modelId",
  2604. "affinity": "TEXT",
  2605. "notNull": true
  2606. },
  2607. {
  2608. "fieldPath": "contextWindow",
  2609. "columnName": "contextWindow",
  2610. "affinity": "INTEGER",
  2611. "notNull": true
  2612. },
  2613. {
  2614. "fieldPath": "maxOutputTokens",
  2615. "columnName": "maxOutputTokens",
  2616. "affinity": "INTEGER",
  2617. "notNull": true
  2618. },
  2619. {
  2620. "fieldPath": "capabilities",
  2621. "columnName": "capabilities",
  2622. "affinity": "TEXT",
  2623. "notNull": true
  2624. },
  2625. {
  2626. "fieldPath": "defaultParamsJson",
  2627. "columnName": "defaultParamsJson",
  2628. "affinity": "TEXT"
  2629. },
  2630. {
  2631. "fieldPath": "enabled",
  2632. "columnName": "enabled",
  2633. "affinity": "INTEGER",
  2634. "notNull": true
  2635. },
  2636. {
  2637. "fieldPath": "sortNumber",
  2638. "columnName": "sortNumber",
  2639. "affinity": "INTEGER",
  2640. "notNull": true
  2641. },
  2642. {
  2643. "fieldPath": "createdAt",
  2644. "columnName": "createdAt",
  2645. "affinity": "INTEGER",
  2646. "notNull": true
  2647. },
  2648. {
  2649. "fieldPath": "updatedAt",
  2650. "columnName": "updatedAt",
  2651. "affinity": "INTEGER",
  2652. "notNull": true
  2653. }
  2654. ],
  2655. "primaryKey": {
  2656. "autoGenerate": false,
  2657. "columnNames": [
  2658. "id"
  2659. ]
  2660. },
  2661. "indices": [
  2662. {
  2663. "name": "index_ai_model_profiles_providerId",
  2664. "unique": false,
  2665. "columnNames": [
  2666. "providerId"
  2667. ],
  2668. "orders": [],
  2669. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_model_profiles_providerId` ON `${TABLE_NAME}` (`providerId`)"
  2670. }
  2671. ]
  2672. },
  2673. {
  2674. "tableName": "ai_task_presets",
  2675. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `taskType` TEXT NOT NULL, `name` TEXT NOT NULL, `modelProfileId` TEXT NOT NULL, `promptTemplate` TEXT NOT NULL, `paramsJson` TEXT, `chunkPolicyJson` TEXT, `enabled` INTEGER NOT NULL, `isDefault` INTEGER NOT NULL, `sortNumber` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2676. "fields": [
  2677. {
  2678. "fieldPath": "id",
  2679. "columnName": "id",
  2680. "affinity": "TEXT",
  2681. "notNull": true
  2682. },
  2683. {
  2684. "fieldPath": "taskType",
  2685. "columnName": "taskType",
  2686. "affinity": "TEXT",
  2687. "notNull": true
  2688. },
  2689. {
  2690. "fieldPath": "name",
  2691. "columnName": "name",
  2692. "affinity": "TEXT",
  2693. "notNull": true
  2694. },
  2695. {
  2696. "fieldPath": "modelProfileId",
  2697. "columnName": "modelProfileId",
  2698. "affinity": "TEXT",
  2699. "notNull": true
  2700. },
  2701. {
  2702. "fieldPath": "promptTemplate",
  2703. "columnName": "promptTemplate",
  2704. "affinity": "TEXT",
  2705. "notNull": true
  2706. },
  2707. {
  2708. "fieldPath": "paramsJson",
  2709. "columnName": "paramsJson",
  2710. "affinity": "TEXT"
  2711. },
  2712. {
  2713. "fieldPath": "chunkPolicyJson",
  2714. "columnName": "chunkPolicyJson",
  2715. "affinity": "TEXT"
  2716. },
  2717. {
  2718. "fieldPath": "enabled",
  2719. "columnName": "enabled",
  2720. "affinity": "INTEGER",
  2721. "notNull": true
  2722. },
  2723. {
  2724. "fieldPath": "isDefault",
  2725. "columnName": "isDefault",
  2726. "affinity": "INTEGER",
  2727. "notNull": true
  2728. },
  2729. {
  2730. "fieldPath": "sortNumber",
  2731. "columnName": "sortNumber",
  2732. "affinity": "INTEGER",
  2733. "notNull": true
  2734. },
  2735. {
  2736. "fieldPath": "createdAt",
  2737. "columnName": "createdAt",
  2738. "affinity": "INTEGER",
  2739. "notNull": true
  2740. },
  2741. {
  2742. "fieldPath": "updatedAt",
  2743. "columnName": "updatedAt",
  2744. "affinity": "INTEGER",
  2745. "notNull": true
  2746. }
  2747. ],
  2748. "primaryKey": {
  2749. "autoGenerate": false,
  2750. "columnNames": [
  2751. "id"
  2752. ]
  2753. },
  2754. "indices": [
  2755. {
  2756. "name": "index_ai_task_presets_taskType",
  2757. "unique": false,
  2758. "columnNames": [
  2759. "taskType"
  2760. ],
  2761. "orders": [],
  2762. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_task_presets_taskType` ON `${TABLE_NAME}` (`taskType`)"
  2763. },
  2764. {
  2765. "name": "index_ai_task_presets_modelProfileId",
  2766. "unique": false,
  2767. "columnNames": [
  2768. "modelProfileId"
  2769. ],
  2770. "orders": [],
  2771. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_task_presets_modelProfileId` ON `${TABLE_NAME}` (`modelProfileId`)"
  2772. }
  2773. ]
  2774. },
  2775. {
  2776. "tableName": "ai_artifacts",
  2777. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `taskType` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `chapterIndex` INTEGER, `contentHash` TEXT NOT NULL, `promptHash` TEXT NOT NULL, `modelProfileId` TEXT NOT NULL, `status` INTEGER NOT NULL, `output` TEXT, `errorMessage` TEXT, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2778. "fields": [
  2779. {
  2780. "fieldPath": "id",
  2781. "columnName": "id",
  2782. "affinity": "TEXT",
  2783. "notNull": true
  2784. },
  2785. {
  2786. "fieldPath": "taskType",
  2787. "columnName": "taskType",
  2788. "affinity": "TEXT",
  2789. "notNull": true
  2790. },
  2791. {
  2792. "fieldPath": "bookUrl",
  2793. "columnName": "bookUrl",
  2794. "affinity": "TEXT",
  2795. "notNull": true
  2796. },
  2797. {
  2798. "fieldPath": "chapterIndex",
  2799. "columnName": "chapterIndex",
  2800. "affinity": "INTEGER"
  2801. },
  2802. {
  2803. "fieldPath": "contentHash",
  2804. "columnName": "contentHash",
  2805. "affinity": "TEXT",
  2806. "notNull": true
  2807. },
  2808. {
  2809. "fieldPath": "promptHash",
  2810. "columnName": "promptHash",
  2811. "affinity": "TEXT",
  2812. "notNull": true
  2813. },
  2814. {
  2815. "fieldPath": "modelProfileId",
  2816. "columnName": "modelProfileId",
  2817. "affinity": "TEXT",
  2818. "notNull": true
  2819. },
  2820. {
  2821. "fieldPath": "status",
  2822. "columnName": "status",
  2823. "affinity": "INTEGER",
  2824. "notNull": true
  2825. },
  2826. {
  2827. "fieldPath": "output",
  2828. "columnName": "output",
  2829. "affinity": "TEXT"
  2830. },
  2831. {
  2832. "fieldPath": "errorMessage",
  2833. "columnName": "errorMessage",
  2834. "affinity": "TEXT"
  2835. },
  2836. {
  2837. "fieldPath": "schemaVersion",
  2838. "columnName": "schemaVersion",
  2839. "affinity": "INTEGER",
  2840. "notNull": true
  2841. },
  2842. {
  2843. "fieldPath": "createdAt",
  2844. "columnName": "createdAt",
  2845. "affinity": "INTEGER",
  2846. "notNull": true
  2847. },
  2848. {
  2849. "fieldPath": "updatedAt",
  2850. "columnName": "updatedAt",
  2851. "affinity": "INTEGER",
  2852. "notNull": true
  2853. }
  2854. ],
  2855. "primaryKey": {
  2856. "autoGenerate": false,
  2857. "columnNames": [
  2858. "id"
  2859. ]
  2860. },
  2861. "indices": [
  2862. {
  2863. "name": "index_ai_artifacts_bookUrl_chapterIndex_taskType",
  2864. "unique": false,
  2865. "columnNames": [
  2866. "bookUrl",
  2867. "chapterIndex",
  2868. "taskType"
  2869. ],
  2870. "orders": [],
  2871. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_artifacts_bookUrl_chapterIndex_taskType` ON `${TABLE_NAME}` (`bookUrl`, `chapterIndex`, `taskType`)"
  2872. },
  2873. {
  2874. "name": "index_ai_artifacts_contentHash_promptHash_modelProfileId",
  2875. "unique": false,
  2876. "columnNames": [
  2877. "contentHash",
  2878. "promptHash",
  2879. "modelProfileId"
  2880. ],
  2881. "orders": [],
  2882. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_artifacts_contentHash_promptHash_modelProfileId` ON `${TABLE_NAME}` (`contentHash`, `promptHash`, `modelProfileId`)"
  2883. }
  2884. ]
  2885. },
  2886. {
  2887. "tableName": "ai_chat_conversations",
  2888. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `title` TEXT NOT NULL, `reasoningLevel` TEXT NOT NULL, `modelProfileId` TEXT, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  2889. "fields": [
  2890. {
  2891. "fieldPath": "id",
  2892. "columnName": "id",
  2893. "affinity": "TEXT",
  2894. "notNull": true
  2895. },
  2896. {
  2897. "fieldPath": "title",
  2898. "columnName": "title",
  2899. "affinity": "TEXT",
  2900. "notNull": true
  2901. },
  2902. {
  2903. "fieldPath": "reasoningLevel",
  2904. "columnName": "reasoningLevel",
  2905. "affinity": "TEXT",
  2906. "notNull": true
  2907. },
  2908. {
  2909. "fieldPath": "modelProfileId",
  2910. "columnName": "modelProfileId",
  2911. "affinity": "TEXT"
  2912. },
  2913. {
  2914. "fieldPath": "createdAt",
  2915. "columnName": "createdAt",
  2916. "affinity": "INTEGER",
  2917. "notNull": true
  2918. },
  2919. {
  2920. "fieldPath": "updatedAt",
  2921. "columnName": "updatedAt",
  2922. "affinity": "INTEGER",
  2923. "notNull": true
  2924. }
  2925. ],
  2926. "primaryKey": {
  2927. "autoGenerate": false,
  2928. "columnNames": [
  2929. "id"
  2930. ]
  2931. }
  2932. },
  2933. {
  2934. "tableName": "ai_chat_messages",
  2935. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `conversationId` TEXT NOT NULL, `role` TEXT NOT NULL, `partsJson` TEXT NOT NULL, `createdAt` INTEGER NOT NULL, `branchIndex` INTEGER NOT NULL, `isSelected` INTEGER NOT NULL, `parentMessageId` TEXT, `thinkingDuration` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`))",
  2936. "fields": [
  2937. {
  2938. "fieldPath": "id",
  2939. "columnName": "id",
  2940. "affinity": "TEXT",
  2941. "notNull": true
  2942. },
  2943. {
  2944. "fieldPath": "conversationId",
  2945. "columnName": "conversationId",
  2946. "affinity": "TEXT",
  2947. "notNull": true
  2948. },
  2949. {
  2950. "fieldPath": "role",
  2951. "columnName": "role",
  2952. "affinity": "TEXT",
  2953. "notNull": true
  2954. },
  2955. {
  2956. "fieldPath": "partsJson",
  2957. "columnName": "partsJson",
  2958. "affinity": "TEXT",
  2959. "notNull": true
  2960. },
  2961. {
  2962. "fieldPath": "createdAt",
  2963. "columnName": "createdAt",
  2964. "affinity": "INTEGER",
  2965. "notNull": true
  2966. },
  2967. {
  2968. "fieldPath": "branchIndex",
  2969. "columnName": "branchIndex",
  2970. "affinity": "INTEGER",
  2971. "notNull": true
  2972. },
  2973. {
  2974. "fieldPath": "isSelected",
  2975. "columnName": "isSelected",
  2976. "affinity": "INTEGER",
  2977. "notNull": true
  2978. },
  2979. {
  2980. "fieldPath": "parentMessageId",
  2981. "columnName": "parentMessageId",
  2982. "affinity": "TEXT"
  2983. },
  2984. {
  2985. "fieldPath": "thinkingDuration",
  2986. "columnName": "thinkingDuration",
  2987. "affinity": "INTEGER",
  2988. "notNull": true,
  2989. "defaultValue": "0"
  2990. }
  2991. ],
  2992. "primaryKey": {
  2993. "autoGenerate": false,
  2994. "columnNames": [
  2995. "id"
  2996. ]
  2997. },
  2998. "indices": [
  2999. {
  3000. "name": "index_ai_chat_messages_conversationId_createdAt",
  3001. "unique": false,
  3002. "columnNames": [
  3003. "conversationId",
  3004. "createdAt"
  3005. ],
  3006. "orders": [],
  3007. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_chat_messages_conversationId_createdAt` ON `${TABLE_NAME}` (`conversationId`, `createdAt`)"
  3008. }
  3009. ]
  3010. },
  3011. {
  3012. "tableName": "ai_memory",
  3013. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`conversationId` TEXT NOT NULL, `key` TEXT NOT NULL, `value` TEXT NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`conversationId`, `key`))",
  3014. "fields": [
  3015. {
  3016. "fieldPath": "conversationId",
  3017. "columnName": "conversationId",
  3018. "affinity": "TEXT",
  3019. "notNull": true
  3020. },
  3021. {
  3022. "fieldPath": "key",
  3023. "columnName": "key",
  3024. "affinity": "TEXT",
  3025. "notNull": true
  3026. },
  3027. {
  3028. "fieldPath": "value",
  3029. "columnName": "value",
  3030. "affinity": "TEXT",
  3031. "notNull": true
  3032. },
  3033. {
  3034. "fieldPath": "updatedAt",
  3035. "columnName": "updatedAt",
  3036. "affinity": "INTEGER",
  3037. "notNull": true
  3038. }
  3039. ],
  3040. "primaryKey": {
  3041. "autoGenerate": false,
  3042. "columnNames": [
  3043. "conversationId",
  3044. "key"
  3045. ]
  3046. },
  3047. "indices": [
  3048. {
  3049. "name": "index_ai_memory_conversationId",
  3050. "unique": false,
  3051. "columnNames": [
  3052. "conversationId"
  3053. ],
  3054. "orders": [],
  3055. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_memory_conversationId` ON `${TABLE_NAME}` (`conversationId`)"
  3056. }
  3057. ]
  3058. },
  3059. {
  3060. "tableName": "highlight_tag_rules",
  3061. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `title` TEXT NOT NULL, `pattern` TEXT NOT NULL, `enabled` INTEGER NOT NULL, `order` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3062. "fields": [
  3063. {
  3064. "fieldPath": "id",
  3065. "columnName": "id",
  3066. "affinity": "INTEGER",
  3067. "notNull": true
  3068. },
  3069. {
  3070. "fieldPath": "title",
  3071. "columnName": "title",
  3072. "affinity": "TEXT",
  3073. "notNull": true
  3074. },
  3075. {
  3076. "fieldPath": "pattern",
  3077. "columnName": "pattern",
  3078. "affinity": "TEXT",
  3079. "notNull": true
  3080. },
  3081. {
  3082. "fieldPath": "enabled",
  3083. "columnName": "enabled",
  3084. "affinity": "INTEGER",
  3085. "notNull": true
  3086. },
  3087. {
  3088. "fieldPath": "order",
  3089. "columnName": "order",
  3090. "affinity": "INTEGER",
  3091. "notNull": true
  3092. }
  3093. ],
  3094. "primaryKey": {
  3095. "autoGenerate": false,
  3096. "columnNames": [
  3097. "id"
  3098. ]
  3099. }
  3100. },
  3101. {
  3102. "tableName": "tag_group_rules",
  3103. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `pattern` TEXT NOT NULL, `groupName` TEXT NOT NULL, `order` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3104. "fields": [
  3105. {
  3106. "fieldPath": "id",
  3107. "columnName": "id",
  3108. "affinity": "INTEGER",
  3109. "notNull": true
  3110. },
  3111. {
  3112. "fieldPath": "pattern",
  3113. "columnName": "pattern",
  3114. "affinity": "TEXT",
  3115. "notNull": true
  3116. },
  3117. {
  3118. "fieldPath": "groupName",
  3119. "columnName": "groupName",
  3120. "affinity": "TEXT",
  3121. "notNull": true
  3122. },
  3123. {
  3124. "fieldPath": "order",
  3125. "columnName": "order",
  3126. "affinity": "INTEGER",
  3127. "notNull": true
  3128. }
  3129. ],
  3130. "primaryKey": {
  3131. "autoGenerate": false,
  3132. "columnNames": [
  3133. "id"
  3134. ]
  3135. }
  3136. },
  3137. {
  3138. "tableName": "book_content_processes",
  3139. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `chapterIndex` INTEGER, `kind` TEXT NOT NULL, `stage` TEXT NOT NULL, `target` TEXT NOT NULL, `anchorJson` TEXT NOT NULL, `actionJson` TEXT NOT NULL, `styleJson` TEXT, `source` TEXT NOT NULL, `aiArtifactId` TEXT, `sourceContentHash` TEXT, `enabled` INTEGER NOT NULL, `sortOrder` INTEGER NOT NULL, `status` INTEGER NOT NULL, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3140. "fields": [
  3141. {
  3142. "fieldPath": "id",
  3143. "columnName": "id",
  3144. "affinity": "TEXT",
  3145. "notNull": true
  3146. },
  3147. {
  3148. "fieldPath": "bookUrl",
  3149. "columnName": "bookUrl",
  3150. "affinity": "TEXT",
  3151. "notNull": true
  3152. },
  3153. {
  3154. "fieldPath": "chapterIndex",
  3155. "columnName": "chapterIndex",
  3156. "affinity": "INTEGER"
  3157. },
  3158. {
  3159. "fieldPath": "kind",
  3160. "columnName": "kind",
  3161. "affinity": "TEXT",
  3162. "notNull": true
  3163. },
  3164. {
  3165. "fieldPath": "stage",
  3166. "columnName": "stage",
  3167. "affinity": "TEXT",
  3168. "notNull": true
  3169. },
  3170. {
  3171. "fieldPath": "target",
  3172. "columnName": "target",
  3173. "affinity": "TEXT",
  3174. "notNull": true
  3175. },
  3176. {
  3177. "fieldPath": "anchorJson",
  3178. "columnName": "anchorJson",
  3179. "affinity": "TEXT",
  3180. "notNull": true
  3181. },
  3182. {
  3183. "fieldPath": "actionJson",
  3184. "columnName": "actionJson",
  3185. "affinity": "TEXT",
  3186. "notNull": true
  3187. },
  3188. {
  3189. "fieldPath": "styleJson",
  3190. "columnName": "styleJson",
  3191. "affinity": "TEXT"
  3192. },
  3193. {
  3194. "fieldPath": "source",
  3195. "columnName": "source",
  3196. "affinity": "TEXT",
  3197. "notNull": true
  3198. },
  3199. {
  3200. "fieldPath": "aiArtifactId",
  3201. "columnName": "aiArtifactId",
  3202. "affinity": "TEXT"
  3203. },
  3204. {
  3205. "fieldPath": "sourceContentHash",
  3206. "columnName": "sourceContentHash",
  3207. "affinity": "TEXT"
  3208. },
  3209. {
  3210. "fieldPath": "enabled",
  3211. "columnName": "enabled",
  3212. "affinity": "INTEGER",
  3213. "notNull": true
  3214. },
  3215. {
  3216. "fieldPath": "sortOrder",
  3217. "columnName": "sortOrder",
  3218. "affinity": "INTEGER",
  3219. "notNull": true
  3220. },
  3221. {
  3222. "fieldPath": "status",
  3223. "columnName": "status",
  3224. "affinity": "INTEGER",
  3225. "notNull": true
  3226. },
  3227. {
  3228. "fieldPath": "schemaVersion",
  3229. "columnName": "schemaVersion",
  3230. "affinity": "INTEGER",
  3231. "notNull": true
  3232. },
  3233. {
  3234. "fieldPath": "createdAt",
  3235. "columnName": "createdAt",
  3236. "affinity": "INTEGER",
  3237. "notNull": true
  3238. },
  3239. {
  3240. "fieldPath": "updatedAt",
  3241. "columnName": "updatedAt",
  3242. "affinity": "INTEGER",
  3243. "notNull": true
  3244. }
  3245. ],
  3246. "primaryKey": {
  3247. "autoGenerate": false,
  3248. "columnNames": [
  3249. "id"
  3250. ]
  3251. },
  3252. "indices": [
  3253. {
  3254. "name": "index_book_content_processes_bookUrl_chapterIndex_enabled_sortOrder",
  3255. "unique": false,
  3256. "columnNames": [
  3257. "bookUrl",
  3258. "chapterIndex",
  3259. "enabled",
  3260. "sortOrder"
  3261. ],
  3262. "orders": [],
  3263. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_content_processes_bookUrl_chapterIndex_enabled_sortOrder` ON `${TABLE_NAME}` (`bookUrl`, `chapterIndex`, `enabled`, `sortOrder`)"
  3264. },
  3265. {
  3266. "name": "index_book_content_processes_bookUrl_kind",
  3267. "unique": false,
  3268. "columnNames": [
  3269. "bookUrl",
  3270. "kind"
  3271. ],
  3272. "orders": [],
  3273. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_content_processes_bookUrl_kind` ON `${TABLE_NAME}` (`bookUrl`, `kind`)"
  3274. },
  3275. {
  3276. "name": "index_book_content_processes_aiArtifactId",
  3277. "unique": false,
  3278. "columnNames": [
  3279. "aiArtifactId"
  3280. ],
  3281. "orders": [],
  3282. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_content_processes_aiArtifactId` ON `${TABLE_NAME}` (`aiArtifactId`)"
  3283. }
  3284. ]
  3285. },
  3286. {
  3287. "tableName": "ai_prompt_presets",
  3288. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `taskType` TEXT NOT NULL, `name` TEXT NOT NULL, `instruction` TEXT NOT NULL, `enabled` INTEGER NOT NULL, `builtIn` INTEGER NOT NULL, `sortNumber` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3289. "fields": [
  3290. {
  3291. "fieldPath": "id",
  3292. "columnName": "id",
  3293. "affinity": "TEXT",
  3294. "notNull": true
  3295. },
  3296. {
  3297. "fieldPath": "taskType",
  3298. "columnName": "taskType",
  3299. "affinity": "TEXT",
  3300. "notNull": true
  3301. },
  3302. {
  3303. "fieldPath": "name",
  3304. "columnName": "name",
  3305. "affinity": "TEXT",
  3306. "notNull": true
  3307. },
  3308. {
  3309. "fieldPath": "instruction",
  3310. "columnName": "instruction",
  3311. "affinity": "TEXT",
  3312. "notNull": true
  3313. },
  3314. {
  3315. "fieldPath": "enabled",
  3316. "columnName": "enabled",
  3317. "affinity": "INTEGER",
  3318. "notNull": true
  3319. },
  3320. {
  3321. "fieldPath": "builtIn",
  3322. "columnName": "builtIn",
  3323. "affinity": "INTEGER",
  3324. "notNull": true
  3325. },
  3326. {
  3327. "fieldPath": "sortNumber",
  3328. "columnName": "sortNumber",
  3329. "affinity": "INTEGER",
  3330. "notNull": true
  3331. },
  3332. {
  3333. "fieldPath": "createdAt",
  3334. "columnName": "createdAt",
  3335. "affinity": "INTEGER",
  3336. "notNull": true
  3337. },
  3338. {
  3339. "fieldPath": "updatedAt",
  3340. "columnName": "updatedAt",
  3341. "affinity": "INTEGER",
  3342. "notNull": true
  3343. }
  3344. ],
  3345. "primaryKey": {
  3346. "autoGenerate": false,
  3347. "columnNames": [
  3348. "id"
  3349. ]
  3350. },
  3351. "indices": [
  3352. {
  3353. "name": "index_ai_prompt_presets_taskType_enabled_sortNumber",
  3354. "unique": false,
  3355. "columnNames": [
  3356. "taskType",
  3357. "enabled",
  3358. "sortNumber"
  3359. ],
  3360. "orders": [],
  3361. "createSql": "CREATE INDEX IF NOT EXISTS `index_ai_prompt_presets_taskType_enabled_sortNumber` ON `${TABLE_NAME}` (`taskType`, `enabled`, `sortNumber`)"
  3362. }
  3363. ]
  3364. },
  3365. {
  3366. "tableName": "book_character_profiles",
  3367. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `name` TEXT NOT NULL, `aliasesJson` TEXT NOT NULL, `avatarUri` TEXT, `tagsJson` TEXT NOT NULL, `role` TEXT NOT NULL, `voiceGender` TEXT NOT NULL DEFAULT 'unknown', `voiceAgeBand` TEXT NOT NULL DEFAULT 'unknown', `personality` TEXT NOT NULL, `summary` TEXT NOT NULL, `status` INTEGER NOT NULL, `source` TEXT NOT NULL, `confidence` REAL NOT NULL, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3368. "fields": [
  3369. {
  3370. "fieldPath": "id",
  3371. "columnName": "id",
  3372. "affinity": "TEXT",
  3373. "notNull": true
  3374. },
  3375. {
  3376. "fieldPath": "bookUrl",
  3377. "columnName": "bookUrl",
  3378. "affinity": "TEXT",
  3379. "notNull": true
  3380. },
  3381. {
  3382. "fieldPath": "name",
  3383. "columnName": "name",
  3384. "affinity": "TEXT",
  3385. "notNull": true
  3386. },
  3387. {
  3388. "fieldPath": "aliasesJson",
  3389. "columnName": "aliasesJson",
  3390. "affinity": "TEXT",
  3391. "notNull": true
  3392. },
  3393. {
  3394. "fieldPath": "avatarUri",
  3395. "columnName": "avatarUri",
  3396. "affinity": "TEXT"
  3397. },
  3398. {
  3399. "fieldPath": "tagsJson",
  3400. "columnName": "tagsJson",
  3401. "affinity": "TEXT",
  3402. "notNull": true
  3403. },
  3404. {
  3405. "fieldPath": "role",
  3406. "columnName": "role",
  3407. "affinity": "TEXT",
  3408. "notNull": true
  3409. },
  3410. {
  3411. "fieldPath": "voiceGender",
  3412. "columnName": "voiceGender",
  3413. "affinity": "TEXT",
  3414. "notNull": true,
  3415. "defaultValue": "'unknown'"
  3416. },
  3417. {
  3418. "fieldPath": "voiceAgeBand",
  3419. "columnName": "voiceAgeBand",
  3420. "affinity": "TEXT",
  3421. "notNull": true,
  3422. "defaultValue": "'unknown'"
  3423. },
  3424. {
  3425. "fieldPath": "personality",
  3426. "columnName": "personality",
  3427. "affinity": "TEXT",
  3428. "notNull": true
  3429. },
  3430. {
  3431. "fieldPath": "summary",
  3432. "columnName": "summary",
  3433. "affinity": "TEXT",
  3434. "notNull": true
  3435. },
  3436. {
  3437. "fieldPath": "status",
  3438. "columnName": "status",
  3439. "affinity": "INTEGER",
  3440. "notNull": true
  3441. },
  3442. {
  3443. "fieldPath": "source",
  3444. "columnName": "source",
  3445. "affinity": "TEXT",
  3446. "notNull": true
  3447. },
  3448. {
  3449. "fieldPath": "confidence",
  3450. "columnName": "confidence",
  3451. "affinity": "REAL",
  3452. "notNull": true
  3453. },
  3454. {
  3455. "fieldPath": "schemaVersion",
  3456. "columnName": "schemaVersion",
  3457. "affinity": "INTEGER",
  3458. "notNull": true
  3459. },
  3460. {
  3461. "fieldPath": "createdAt",
  3462. "columnName": "createdAt",
  3463. "affinity": "INTEGER",
  3464. "notNull": true
  3465. },
  3466. {
  3467. "fieldPath": "updatedAt",
  3468. "columnName": "updatedAt",
  3469. "affinity": "INTEGER",
  3470. "notNull": true
  3471. }
  3472. ],
  3473. "primaryKey": {
  3474. "autoGenerate": false,
  3475. "columnNames": [
  3476. "id"
  3477. ]
  3478. },
  3479. "indices": [
  3480. {
  3481. "name": "index_book_character_profiles_bookUrl_name",
  3482. "unique": true,
  3483. "columnNames": [
  3484. "bookUrl",
  3485. "name"
  3486. ],
  3487. "orders": [],
  3488. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_book_character_profiles_bookUrl_name` ON `${TABLE_NAME}` (`bookUrl`, `name`)"
  3489. },
  3490. {
  3491. "name": "index_book_character_profiles_bookUrl_updatedAt",
  3492. "unique": false,
  3493. "columnNames": [
  3494. "bookUrl",
  3495. "updatedAt"
  3496. ],
  3497. "orders": [],
  3498. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_character_profiles_bookUrl_updatedAt` ON `${TABLE_NAME}` (`bookUrl`, `updatedAt`)"
  3499. }
  3500. ]
  3501. },
  3502. {
  3503. "tableName": "book_character_events",
  3504. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `characterId` TEXT NOT NULL, `chapterIndex` INTEGER, `chapterTitle` TEXT NOT NULL, `eventTimeText` TEXT NOT NULL, `content` TEXT NOT NULL, `importance` INTEGER NOT NULL, `sourceTextHash` TEXT, `evidenceJson` TEXT NOT NULL, `source` TEXT NOT NULL, `confidence` REAL NOT NULL, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3505. "fields": [
  3506. {
  3507. "fieldPath": "id",
  3508. "columnName": "id",
  3509. "affinity": "TEXT",
  3510. "notNull": true
  3511. },
  3512. {
  3513. "fieldPath": "bookUrl",
  3514. "columnName": "bookUrl",
  3515. "affinity": "TEXT",
  3516. "notNull": true
  3517. },
  3518. {
  3519. "fieldPath": "characterId",
  3520. "columnName": "characterId",
  3521. "affinity": "TEXT",
  3522. "notNull": true
  3523. },
  3524. {
  3525. "fieldPath": "chapterIndex",
  3526. "columnName": "chapterIndex",
  3527. "affinity": "INTEGER"
  3528. },
  3529. {
  3530. "fieldPath": "chapterTitle",
  3531. "columnName": "chapterTitle",
  3532. "affinity": "TEXT",
  3533. "notNull": true
  3534. },
  3535. {
  3536. "fieldPath": "eventTimeText",
  3537. "columnName": "eventTimeText",
  3538. "affinity": "TEXT",
  3539. "notNull": true
  3540. },
  3541. {
  3542. "fieldPath": "content",
  3543. "columnName": "content",
  3544. "affinity": "TEXT",
  3545. "notNull": true
  3546. },
  3547. {
  3548. "fieldPath": "importance",
  3549. "columnName": "importance",
  3550. "affinity": "INTEGER",
  3551. "notNull": true
  3552. },
  3553. {
  3554. "fieldPath": "sourceTextHash",
  3555. "columnName": "sourceTextHash",
  3556. "affinity": "TEXT"
  3557. },
  3558. {
  3559. "fieldPath": "evidenceJson",
  3560. "columnName": "evidenceJson",
  3561. "affinity": "TEXT",
  3562. "notNull": true
  3563. },
  3564. {
  3565. "fieldPath": "source",
  3566. "columnName": "source",
  3567. "affinity": "TEXT",
  3568. "notNull": true
  3569. },
  3570. {
  3571. "fieldPath": "confidence",
  3572. "columnName": "confidence",
  3573. "affinity": "REAL",
  3574. "notNull": true
  3575. },
  3576. {
  3577. "fieldPath": "schemaVersion",
  3578. "columnName": "schemaVersion",
  3579. "affinity": "INTEGER",
  3580. "notNull": true
  3581. },
  3582. {
  3583. "fieldPath": "createdAt",
  3584. "columnName": "createdAt",
  3585. "affinity": "INTEGER",
  3586. "notNull": true
  3587. },
  3588. {
  3589. "fieldPath": "updatedAt",
  3590. "columnName": "updatedAt",
  3591. "affinity": "INTEGER",
  3592. "notNull": true
  3593. }
  3594. ],
  3595. "primaryKey": {
  3596. "autoGenerate": false,
  3597. "columnNames": [
  3598. "id"
  3599. ]
  3600. },
  3601. "indices": [
  3602. {
  3603. "name": "index_book_character_events_bookUrl_characterId_chapterIndex",
  3604. "unique": false,
  3605. "columnNames": [
  3606. "bookUrl",
  3607. "characterId",
  3608. "chapterIndex"
  3609. ],
  3610. "orders": [],
  3611. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_character_events_bookUrl_characterId_chapterIndex` ON `${TABLE_NAME}` (`bookUrl`, `characterId`, `chapterIndex`)"
  3612. },
  3613. {
  3614. "name": "index_book_character_events_bookUrl_chapterIndex",
  3615. "unique": false,
  3616. "columnNames": [
  3617. "bookUrl",
  3618. "chapterIndex"
  3619. ],
  3620. "orders": [],
  3621. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_character_events_bookUrl_chapterIndex` ON `${TABLE_NAME}` (`bookUrl`, `chapterIndex`)"
  3622. }
  3623. ]
  3624. },
  3625. {
  3626. "tableName": "book_character_relations",
  3627. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `fromCharacterId` TEXT NOT NULL, `toCharacterId` TEXT NOT NULL, `relationType` TEXT NOT NULL, `summary` TEXT NOT NULL, `attitude` TEXT NOT NULL, `evidenceJson` TEXT NOT NULL, `chapterIndex` INTEGER, `status` INTEGER NOT NULL, `source` TEXT NOT NULL, `confidence` REAL NOT NULL, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3628. "fields": [
  3629. {
  3630. "fieldPath": "id",
  3631. "columnName": "id",
  3632. "affinity": "TEXT",
  3633. "notNull": true
  3634. },
  3635. {
  3636. "fieldPath": "bookUrl",
  3637. "columnName": "bookUrl",
  3638. "affinity": "TEXT",
  3639. "notNull": true
  3640. },
  3641. {
  3642. "fieldPath": "fromCharacterId",
  3643. "columnName": "fromCharacterId",
  3644. "affinity": "TEXT",
  3645. "notNull": true
  3646. },
  3647. {
  3648. "fieldPath": "toCharacterId",
  3649. "columnName": "toCharacterId",
  3650. "affinity": "TEXT",
  3651. "notNull": true
  3652. },
  3653. {
  3654. "fieldPath": "relationType",
  3655. "columnName": "relationType",
  3656. "affinity": "TEXT",
  3657. "notNull": true
  3658. },
  3659. {
  3660. "fieldPath": "summary",
  3661. "columnName": "summary",
  3662. "affinity": "TEXT",
  3663. "notNull": true
  3664. },
  3665. {
  3666. "fieldPath": "attitude",
  3667. "columnName": "attitude",
  3668. "affinity": "TEXT",
  3669. "notNull": true
  3670. },
  3671. {
  3672. "fieldPath": "evidenceJson",
  3673. "columnName": "evidenceJson",
  3674. "affinity": "TEXT",
  3675. "notNull": true
  3676. },
  3677. {
  3678. "fieldPath": "chapterIndex",
  3679. "columnName": "chapterIndex",
  3680. "affinity": "INTEGER"
  3681. },
  3682. {
  3683. "fieldPath": "status",
  3684. "columnName": "status",
  3685. "affinity": "INTEGER",
  3686. "notNull": true
  3687. },
  3688. {
  3689. "fieldPath": "source",
  3690. "columnName": "source",
  3691. "affinity": "TEXT",
  3692. "notNull": true
  3693. },
  3694. {
  3695. "fieldPath": "confidence",
  3696. "columnName": "confidence",
  3697. "affinity": "REAL",
  3698. "notNull": true
  3699. },
  3700. {
  3701. "fieldPath": "schemaVersion",
  3702. "columnName": "schemaVersion",
  3703. "affinity": "INTEGER",
  3704. "notNull": true
  3705. },
  3706. {
  3707. "fieldPath": "createdAt",
  3708. "columnName": "createdAt",
  3709. "affinity": "INTEGER",
  3710. "notNull": true
  3711. },
  3712. {
  3713. "fieldPath": "updatedAt",
  3714. "columnName": "updatedAt",
  3715. "affinity": "INTEGER",
  3716. "notNull": true
  3717. }
  3718. ],
  3719. "primaryKey": {
  3720. "autoGenerate": false,
  3721. "columnNames": [
  3722. "id"
  3723. ]
  3724. },
  3725. "indices": [
  3726. {
  3727. "name": "index_book_character_relations_bookUrl_fromCharacterId_toCharacterId",
  3728. "unique": true,
  3729. "columnNames": [
  3730. "bookUrl",
  3731. "fromCharacterId",
  3732. "toCharacterId"
  3733. ],
  3734. "orders": [],
  3735. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_book_character_relations_bookUrl_fromCharacterId_toCharacterId` ON `${TABLE_NAME}` (`bookUrl`, `fromCharacterId`, `toCharacterId`)"
  3736. },
  3737. {
  3738. "name": "index_book_character_relations_bookUrl_fromCharacterId",
  3739. "unique": false,
  3740. "columnNames": [
  3741. "bookUrl",
  3742. "fromCharacterId"
  3743. ],
  3744. "orders": [],
  3745. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_character_relations_bookUrl_fromCharacterId` ON `${TABLE_NAME}` (`bookUrl`, `fromCharacterId`)"
  3746. },
  3747. {
  3748. "name": "index_book_character_relations_bookUrl_toCharacterId",
  3749. "unique": false,
  3750. "columnNames": [
  3751. "bookUrl",
  3752. "toCharacterId"
  3753. ],
  3754. "orders": [],
  3755. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_character_relations_bookUrl_toCharacterId` ON `${TABLE_NAME}` (`bookUrl`, `toCharacterId`)"
  3756. }
  3757. ]
  3758. },
  3759. {
  3760. "tableName": "book_knowledge_entries",
  3761. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `type` TEXT NOT NULL, `title` TEXT NOT NULL, `keywordsJson` TEXT NOT NULL, `content` TEXT NOT NULL, `scopeStartChapter` INTEGER, `scopeEndChapter` INTEGER, `priority` INTEGER NOT NULL, `source` TEXT NOT NULL, `confidence` REAL NOT NULL, `evidenceJson` TEXT NOT NULL, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3762. "fields": [
  3763. {
  3764. "fieldPath": "id",
  3765. "columnName": "id",
  3766. "affinity": "TEXT",
  3767. "notNull": true
  3768. },
  3769. {
  3770. "fieldPath": "bookUrl",
  3771. "columnName": "bookUrl",
  3772. "affinity": "TEXT",
  3773. "notNull": true
  3774. },
  3775. {
  3776. "fieldPath": "type",
  3777. "columnName": "type",
  3778. "affinity": "TEXT",
  3779. "notNull": true
  3780. },
  3781. {
  3782. "fieldPath": "title",
  3783. "columnName": "title",
  3784. "affinity": "TEXT",
  3785. "notNull": true
  3786. },
  3787. {
  3788. "fieldPath": "keywordsJson",
  3789. "columnName": "keywordsJson",
  3790. "affinity": "TEXT",
  3791. "notNull": true
  3792. },
  3793. {
  3794. "fieldPath": "content",
  3795. "columnName": "content",
  3796. "affinity": "TEXT",
  3797. "notNull": true
  3798. },
  3799. {
  3800. "fieldPath": "scopeStartChapter",
  3801. "columnName": "scopeStartChapter",
  3802. "affinity": "INTEGER"
  3803. },
  3804. {
  3805. "fieldPath": "scopeEndChapter",
  3806. "columnName": "scopeEndChapter",
  3807. "affinity": "INTEGER"
  3808. },
  3809. {
  3810. "fieldPath": "priority",
  3811. "columnName": "priority",
  3812. "affinity": "INTEGER",
  3813. "notNull": true
  3814. },
  3815. {
  3816. "fieldPath": "source",
  3817. "columnName": "source",
  3818. "affinity": "TEXT",
  3819. "notNull": true
  3820. },
  3821. {
  3822. "fieldPath": "confidence",
  3823. "columnName": "confidence",
  3824. "affinity": "REAL",
  3825. "notNull": true
  3826. },
  3827. {
  3828. "fieldPath": "evidenceJson",
  3829. "columnName": "evidenceJson",
  3830. "affinity": "TEXT",
  3831. "notNull": true
  3832. },
  3833. {
  3834. "fieldPath": "schemaVersion",
  3835. "columnName": "schemaVersion",
  3836. "affinity": "INTEGER",
  3837. "notNull": true
  3838. },
  3839. {
  3840. "fieldPath": "createdAt",
  3841. "columnName": "createdAt",
  3842. "affinity": "INTEGER",
  3843. "notNull": true
  3844. },
  3845. {
  3846. "fieldPath": "updatedAt",
  3847. "columnName": "updatedAt",
  3848. "affinity": "INTEGER",
  3849. "notNull": true
  3850. }
  3851. ],
  3852. "primaryKey": {
  3853. "autoGenerate": false,
  3854. "columnNames": [
  3855. "id"
  3856. ]
  3857. },
  3858. "indices": [
  3859. {
  3860. "name": "index_book_knowledge_entries_bookUrl_type_priority",
  3861. "unique": false,
  3862. "columnNames": [
  3863. "bookUrl",
  3864. "type",
  3865. "priority"
  3866. ],
  3867. "orders": [],
  3868. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_knowledge_entries_bookUrl_type_priority` ON `${TABLE_NAME}` (`bookUrl`, `type`, `priority`)"
  3869. },
  3870. {
  3871. "name": "index_book_knowledge_entries_bookUrl_title",
  3872. "unique": false,
  3873. "columnNames": [
  3874. "bookUrl",
  3875. "title"
  3876. ],
  3877. "orders": [],
  3878. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_knowledge_entries_bookUrl_title` ON `${TABLE_NAME}` (`bookUrl`, `title`)"
  3879. }
  3880. ]
  3881. },
  3882. {
  3883. "tableName": "book_outline_nodes",
  3884. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `parentId` TEXT, `nodeType` TEXT NOT NULL, `title` TEXT NOT NULL, `summary` TEXT NOT NULL, `startChapterIndex` INTEGER, `endChapterIndex` INTEGER, `order` INTEGER NOT NULL, `source` TEXT NOT NULL, `confidence` REAL NOT NULL, `schemaVersion` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  3885. "fields": [
  3886. {
  3887. "fieldPath": "id",
  3888. "columnName": "id",
  3889. "affinity": "TEXT",
  3890. "notNull": true
  3891. },
  3892. {
  3893. "fieldPath": "bookUrl",
  3894. "columnName": "bookUrl",
  3895. "affinity": "TEXT",
  3896. "notNull": true
  3897. },
  3898. {
  3899. "fieldPath": "parentId",
  3900. "columnName": "parentId",
  3901. "affinity": "TEXT"
  3902. },
  3903. {
  3904. "fieldPath": "nodeType",
  3905. "columnName": "nodeType",
  3906. "affinity": "TEXT",
  3907. "notNull": true
  3908. },
  3909. {
  3910. "fieldPath": "title",
  3911. "columnName": "title",
  3912. "affinity": "TEXT",
  3913. "notNull": true
  3914. },
  3915. {
  3916. "fieldPath": "summary",
  3917. "columnName": "summary",
  3918. "affinity": "TEXT",
  3919. "notNull": true
  3920. },
  3921. {
  3922. "fieldPath": "startChapterIndex",
  3923. "columnName": "startChapterIndex",
  3924. "affinity": "INTEGER"
  3925. },
  3926. {
  3927. "fieldPath": "endChapterIndex",
  3928. "columnName": "endChapterIndex",
  3929. "affinity": "INTEGER"
  3930. },
  3931. {
  3932. "fieldPath": "order",
  3933. "columnName": "order",
  3934. "affinity": "INTEGER",
  3935. "notNull": true
  3936. },
  3937. {
  3938. "fieldPath": "source",
  3939. "columnName": "source",
  3940. "affinity": "TEXT",
  3941. "notNull": true
  3942. },
  3943. {
  3944. "fieldPath": "confidence",
  3945. "columnName": "confidence",
  3946. "affinity": "REAL",
  3947. "notNull": true
  3948. },
  3949. {
  3950. "fieldPath": "schemaVersion",
  3951. "columnName": "schemaVersion",
  3952. "affinity": "INTEGER",
  3953. "notNull": true
  3954. },
  3955. {
  3956. "fieldPath": "createdAt",
  3957. "columnName": "createdAt",
  3958. "affinity": "INTEGER",
  3959. "notNull": true
  3960. },
  3961. {
  3962. "fieldPath": "updatedAt",
  3963. "columnName": "updatedAt",
  3964. "affinity": "INTEGER",
  3965. "notNull": true
  3966. }
  3967. ],
  3968. "primaryKey": {
  3969. "autoGenerate": false,
  3970. "columnNames": [
  3971. "id"
  3972. ]
  3973. },
  3974. "indices": [
  3975. {
  3976. "name": "index_book_outline_nodes_bookUrl_nodeType_startChapterIndex_endChapterIndex",
  3977. "unique": false,
  3978. "columnNames": [
  3979. "bookUrl",
  3980. "nodeType",
  3981. "startChapterIndex",
  3982. "endChapterIndex"
  3983. ],
  3984. "orders": [],
  3985. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_outline_nodes_bookUrl_nodeType_startChapterIndex_endChapterIndex` ON `${TABLE_NAME}` (`bookUrl`, `nodeType`, `startChapterIndex`, `endChapterIndex`)"
  3986. },
  3987. {
  3988. "name": "index_book_outline_nodes_bookUrl_parentId_order",
  3989. "unique": false,
  3990. "columnNames": [
  3991. "bookUrl",
  3992. "parentId",
  3993. "order"
  3994. ],
  3995. "orders": [],
  3996. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_outline_nodes_bookUrl_parentId_order` ON `${TABLE_NAME}` (`bookUrl`, `parentId`, `order`)"
  3997. }
  3998. ]
  3999. },
  4000. {
  4001. "tableName": "read_aloud_voices",
  4002. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `engineType` TEXT NOT NULL, `engineId` TEXT NOT NULL DEFAULT '', `speakerId` TEXT NOT NULL DEFAULT '', `displayName` TEXT NOT NULL, `traitsJson` TEXT NOT NULL DEFAULT '[]', `emotionCatalogJson` TEXT NOT NULL DEFAULT '[]', `managedBy` TEXT NOT NULL DEFAULT 'user', `enabled` INTEGER NOT NULL DEFAULT 1, `available` INTEGER NOT NULL DEFAULT 1, `revision` INTEGER NOT NULL DEFAULT 0, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  4003. "fields": [
  4004. {
  4005. "fieldPath": "id",
  4006. "columnName": "id",
  4007. "affinity": "TEXT",
  4008. "notNull": true
  4009. },
  4010. {
  4011. "fieldPath": "engineType",
  4012. "columnName": "engineType",
  4013. "affinity": "TEXT",
  4014. "notNull": true
  4015. },
  4016. {
  4017. "fieldPath": "engineId",
  4018. "columnName": "engineId",
  4019. "affinity": "TEXT",
  4020. "notNull": true,
  4021. "defaultValue": "''"
  4022. },
  4023. {
  4024. "fieldPath": "speakerId",
  4025. "columnName": "speakerId",
  4026. "affinity": "TEXT",
  4027. "notNull": true,
  4028. "defaultValue": "''"
  4029. },
  4030. {
  4031. "fieldPath": "displayName",
  4032. "columnName": "displayName",
  4033. "affinity": "TEXT",
  4034. "notNull": true
  4035. },
  4036. {
  4037. "fieldPath": "traitsJson",
  4038. "columnName": "traitsJson",
  4039. "affinity": "TEXT",
  4040. "notNull": true,
  4041. "defaultValue": "'[]'"
  4042. },
  4043. {
  4044. "fieldPath": "emotionCatalogJson",
  4045. "columnName": "emotionCatalogJson",
  4046. "affinity": "TEXT",
  4047. "notNull": true,
  4048. "defaultValue": "'[]'"
  4049. },
  4050. {
  4051. "fieldPath": "managedBy",
  4052. "columnName": "managedBy",
  4053. "affinity": "TEXT",
  4054. "notNull": true,
  4055. "defaultValue": "'user'"
  4056. },
  4057. {
  4058. "fieldPath": "enabled",
  4059. "columnName": "enabled",
  4060. "affinity": "INTEGER",
  4061. "notNull": true,
  4062. "defaultValue": "1"
  4063. },
  4064. {
  4065. "fieldPath": "available",
  4066. "columnName": "available",
  4067. "affinity": "INTEGER",
  4068. "notNull": true,
  4069. "defaultValue": "1"
  4070. },
  4071. {
  4072. "fieldPath": "revision",
  4073. "columnName": "revision",
  4074. "affinity": "INTEGER",
  4075. "notNull": true,
  4076. "defaultValue": "0"
  4077. },
  4078. {
  4079. "fieldPath": "createdAt",
  4080. "columnName": "createdAt",
  4081. "affinity": "INTEGER",
  4082. "notNull": true
  4083. },
  4084. {
  4085. "fieldPath": "updatedAt",
  4086. "columnName": "updatedAt",
  4087. "affinity": "INTEGER",
  4088. "notNull": true
  4089. }
  4090. ],
  4091. "primaryKey": {
  4092. "autoGenerate": false,
  4093. "columnNames": [
  4094. "id"
  4095. ]
  4096. },
  4097. "indices": [
  4098. {
  4099. "name": "index_read_aloud_voices_engineType_engineId_speakerId",
  4100. "unique": true,
  4101. "columnNames": [
  4102. "engineType",
  4103. "engineId",
  4104. "speakerId"
  4105. ],
  4106. "orders": [],
  4107. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_read_aloud_voices_engineType_engineId_speakerId` ON `${TABLE_NAME}` (`engineType`, `engineId`, `speakerId`)"
  4108. },
  4109. {
  4110. "name": "index_read_aloud_voices_enabled_displayName",
  4111. "unique": false,
  4112. "columnNames": [
  4113. "enabled",
  4114. "displayName"
  4115. ],
  4116. "orders": [],
  4117. "createSql": "CREATE INDEX IF NOT EXISTS `index_read_aloud_voices_enabled_displayName` ON `${TABLE_NAME}` (`enabled`, `displayName`)"
  4118. }
  4119. ]
  4120. },
  4121. {
  4122. "tableName": "book_voice_bindings",
  4123. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookUrl` TEXT NOT NULL, `subjectType` TEXT NOT NULL, `subjectId` TEXT NOT NULL, `voiceId` TEXT NOT NULL, `locked` INTEGER NOT NULL DEFAULT 0, `source` TEXT NOT NULL DEFAULT 'user', `confidence` REAL NOT NULL DEFAULT 1, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`bookUrl`, `subjectType`, `subjectId`))",
  4124. "fields": [
  4125. {
  4126. "fieldPath": "bookUrl",
  4127. "columnName": "bookUrl",
  4128. "affinity": "TEXT",
  4129. "notNull": true
  4130. },
  4131. {
  4132. "fieldPath": "subjectType",
  4133. "columnName": "subjectType",
  4134. "affinity": "TEXT",
  4135. "notNull": true
  4136. },
  4137. {
  4138. "fieldPath": "subjectId",
  4139. "columnName": "subjectId",
  4140. "affinity": "TEXT",
  4141. "notNull": true
  4142. },
  4143. {
  4144. "fieldPath": "voiceId",
  4145. "columnName": "voiceId",
  4146. "affinity": "TEXT",
  4147. "notNull": true
  4148. },
  4149. {
  4150. "fieldPath": "locked",
  4151. "columnName": "locked",
  4152. "affinity": "INTEGER",
  4153. "notNull": true,
  4154. "defaultValue": "0"
  4155. },
  4156. {
  4157. "fieldPath": "source",
  4158. "columnName": "source",
  4159. "affinity": "TEXT",
  4160. "notNull": true,
  4161. "defaultValue": "'user'"
  4162. },
  4163. {
  4164. "fieldPath": "confidence",
  4165. "columnName": "confidence",
  4166. "affinity": "REAL",
  4167. "notNull": true,
  4168. "defaultValue": "1"
  4169. },
  4170. {
  4171. "fieldPath": "createdAt",
  4172. "columnName": "createdAt",
  4173. "affinity": "INTEGER",
  4174. "notNull": true
  4175. },
  4176. {
  4177. "fieldPath": "updatedAt",
  4178. "columnName": "updatedAt",
  4179. "affinity": "INTEGER",
  4180. "notNull": true
  4181. }
  4182. ],
  4183. "primaryKey": {
  4184. "autoGenerate": false,
  4185. "columnNames": [
  4186. "bookUrl",
  4187. "subjectType",
  4188. "subjectId"
  4189. ]
  4190. },
  4191. "indices": [
  4192. {
  4193. "name": "index_book_voice_bindings_bookUrl_subjectType",
  4194. "unique": false,
  4195. "columnNames": [
  4196. "bookUrl",
  4197. "subjectType"
  4198. ],
  4199. "orders": [],
  4200. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_voice_bindings_bookUrl_subjectType` ON `${TABLE_NAME}` (`bookUrl`, `subjectType`)"
  4201. },
  4202. {
  4203. "name": "index_book_voice_bindings_voiceId",
  4204. "unique": false,
  4205. "columnNames": [
  4206. "voiceId"
  4207. ],
  4208. "orders": [],
  4209. "createSql": "CREATE INDEX IF NOT EXISTS `index_book_voice_bindings_voiceId` ON `${TABLE_NAME}` (`voiceId`)"
  4210. }
  4211. ]
  4212. },
  4213. {
  4214. "tableName": "chapter_speech_analysis",
  4215. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `chapterIndex` INTEGER NOT NULL, `contentHash` TEXT NOT NULL, `resolverVersion` TEXT NOT NULL, `characterRevision` TEXT NOT NULL DEFAULT '', `status` TEXT NOT NULL DEFAULT 'pending', `error` TEXT NOT NULL DEFAULT '', `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  4216. "fields": [
  4217. {
  4218. "fieldPath": "id",
  4219. "columnName": "id",
  4220. "affinity": "TEXT",
  4221. "notNull": true
  4222. },
  4223. {
  4224. "fieldPath": "bookUrl",
  4225. "columnName": "bookUrl",
  4226. "affinity": "TEXT",
  4227. "notNull": true
  4228. },
  4229. {
  4230. "fieldPath": "chapterIndex",
  4231. "columnName": "chapterIndex",
  4232. "affinity": "INTEGER",
  4233. "notNull": true
  4234. },
  4235. {
  4236. "fieldPath": "contentHash",
  4237. "columnName": "contentHash",
  4238. "affinity": "TEXT",
  4239. "notNull": true
  4240. },
  4241. {
  4242. "fieldPath": "resolverVersion",
  4243. "columnName": "resolverVersion",
  4244. "affinity": "TEXT",
  4245. "notNull": true
  4246. },
  4247. {
  4248. "fieldPath": "characterRevision",
  4249. "columnName": "characterRevision",
  4250. "affinity": "TEXT",
  4251. "notNull": true,
  4252. "defaultValue": "''"
  4253. },
  4254. {
  4255. "fieldPath": "status",
  4256. "columnName": "status",
  4257. "affinity": "TEXT",
  4258. "notNull": true,
  4259. "defaultValue": "'pending'"
  4260. },
  4261. {
  4262. "fieldPath": "error",
  4263. "columnName": "error",
  4264. "affinity": "TEXT",
  4265. "notNull": true,
  4266. "defaultValue": "''"
  4267. },
  4268. {
  4269. "fieldPath": "createdAt",
  4270. "columnName": "createdAt",
  4271. "affinity": "INTEGER",
  4272. "notNull": true
  4273. },
  4274. {
  4275. "fieldPath": "updatedAt",
  4276. "columnName": "updatedAt",
  4277. "affinity": "INTEGER",
  4278. "notNull": true
  4279. }
  4280. ],
  4281. "primaryKey": {
  4282. "autoGenerate": false,
  4283. "columnNames": [
  4284. "id"
  4285. ]
  4286. },
  4287. "indices": [
  4288. {
  4289. "name": "index_chapter_speech_analysis_bookUrl_chapterIndex_contentHash_resolverVersion",
  4290. "unique": true,
  4291. "columnNames": [
  4292. "bookUrl",
  4293. "chapterIndex",
  4294. "contentHash",
  4295. "resolverVersion"
  4296. ],
  4297. "orders": [],
  4298. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_chapter_speech_analysis_bookUrl_chapterIndex_contentHash_resolverVersion` ON `${TABLE_NAME}` (`bookUrl`, `chapterIndex`, `contentHash`, `resolverVersion`)"
  4299. },
  4300. {
  4301. "name": "index_chapter_speech_analysis_bookUrl_chapterIndex_updatedAt",
  4302. "unique": false,
  4303. "columnNames": [
  4304. "bookUrl",
  4305. "chapterIndex",
  4306. "updatedAt"
  4307. ],
  4308. "orders": [],
  4309. "createSql": "CREATE INDEX IF NOT EXISTS `index_chapter_speech_analysis_bookUrl_chapterIndex_updatedAt` ON `${TABLE_NAME}` (`bookUrl`, `chapterIndex`, `updatedAt`)"
  4310. }
  4311. ]
  4312. },
  4313. {
  4314. "tableName": "chapter_speech_segments",
  4315. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `analysisId` TEXT NOT NULL, `bookUrl` TEXT NOT NULL, `chapterIndex` INTEGER NOT NULL, `paragraphIndex` INTEGER NOT NULL, `start` INTEGER NOT NULL, `end` INTEGER NOT NULL, `chapterPosition` INTEGER NOT NULL, `text` TEXT NOT NULL, `roleType` TEXT NOT NULL, `characterId` TEXT, `characterName` TEXT NOT NULL DEFAULT '', `emotion` TEXT NOT NULL DEFAULT '', `confidence` REAL NOT NULL DEFAULT 0, `source` TEXT NOT NULL, `userLocked` INTEGER NOT NULL DEFAULT 0, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  4316. "fields": [
  4317. {
  4318. "fieldPath": "id",
  4319. "columnName": "id",
  4320. "affinity": "TEXT",
  4321. "notNull": true
  4322. },
  4323. {
  4324. "fieldPath": "analysisId",
  4325. "columnName": "analysisId",
  4326. "affinity": "TEXT",
  4327. "notNull": true
  4328. },
  4329. {
  4330. "fieldPath": "bookUrl",
  4331. "columnName": "bookUrl",
  4332. "affinity": "TEXT",
  4333. "notNull": true
  4334. },
  4335. {
  4336. "fieldPath": "chapterIndex",
  4337. "columnName": "chapterIndex",
  4338. "affinity": "INTEGER",
  4339. "notNull": true
  4340. },
  4341. {
  4342. "fieldPath": "paragraphIndex",
  4343. "columnName": "paragraphIndex",
  4344. "affinity": "INTEGER",
  4345. "notNull": true
  4346. },
  4347. {
  4348. "fieldPath": "start",
  4349. "columnName": "start",
  4350. "affinity": "INTEGER",
  4351. "notNull": true
  4352. },
  4353. {
  4354. "fieldPath": "end",
  4355. "columnName": "end",
  4356. "affinity": "INTEGER",
  4357. "notNull": true
  4358. },
  4359. {
  4360. "fieldPath": "chapterPosition",
  4361. "columnName": "chapterPosition",
  4362. "affinity": "INTEGER",
  4363. "notNull": true
  4364. },
  4365. {
  4366. "fieldPath": "text",
  4367. "columnName": "text",
  4368. "affinity": "TEXT",
  4369. "notNull": true
  4370. },
  4371. {
  4372. "fieldPath": "roleType",
  4373. "columnName": "roleType",
  4374. "affinity": "TEXT",
  4375. "notNull": true
  4376. },
  4377. {
  4378. "fieldPath": "characterId",
  4379. "columnName": "characterId",
  4380. "affinity": "TEXT"
  4381. },
  4382. {
  4383. "fieldPath": "characterName",
  4384. "columnName": "characterName",
  4385. "affinity": "TEXT",
  4386. "notNull": true,
  4387. "defaultValue": "''"
  4388. },
  4389. {
  4390. "fieldPath": "emotion",
  4391. "columnName": "emotion",
  4392. "affinity": "TEXT",
  4393. "notNull": true,
  4394. "defaultValue": "''"
  4395. },
  4396. {
  4397. "fieldPath": "confidence",
  4398. "columnName": "confidence",
  4399. "affinity": "REAL",
  4400. "notNull": true,
  4401. "defaultValue": "0"
  4402. },
  4403. {
  4404. "fieldPath": "source",
  4405. "columnName": "source",
  4406. "affinity": "TEXT",
  4407. "notNull": true
  4408. },
  4409. {
  4410. "fieldPath": "userLocked",
  4411. "columnName": "userLocked",
  4412. "affinity": "INTEGER",
  4413. "notNull": true,
  4414. "defaultValue": "0"
  4415. },
  4416. {
  4417. "fieldPath": "createdAt",
  4418. "columnName": "createdAt",
  4419. "affinity": "INTEGER",
  4420. "notNull": true
  4421. },
  4422. {
  4423. "fieldPath": "updatedAt",
  4424. "columnName": "updatedAt",
  4425. "affinity": "INTEGER",
  4426. "notNull": true
  4427. }
  4428. ],
  4429. "primaryKey": {
  4430. "autoGenerate": false,
  4431. "columnNames": [
  4432. "id"
  4433. ]
  4434. },
  4435. "indices": [
  4436. {
  4437. "name": "index_chapter_speech_segments_analysisId_paragraphIndex_start_end",
  4438. "unique": true,
  4439. "columnNames": [
  4440. "analysisId",
  4441. "paragraphIndex",
  4442. "start",
  4443. "end"
  4444. ],
  4445. "orders": [],
  4446. "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_chapter_speech_segments_analysisId_paragraphIndex_start_end` ON `${TABLE_NAME}` (`analysisId`, `paragraphIndex`, `start`, `end`)"
  4447. },
  4448. {
  4449. "name": "index_chapter_speech_segments_bookUrl_chapterIndex_paragraphIndex",
  4450. "unique": false,
  4451. "columnNames": [
  4452. "bookUrl",
  4453. "chapterIndex",
  4454. "paragraphIndex"
  4455. ],
  4456. "orders": [],
  4457. "createSql": "CREATE INDEX IF NOT EXISTS `index_chapter_speech_segments_bookUrl_chapterIndex_paragraphIndex` ON `${TABLE_NAME}` (`bookUrl`, `chapterIndex`, `paragraphIndex`)"
  4458. },
  4459. {
  4460. "name": "index_chapter_speech_segments_characterId",
  4461. "unique": false,
  4462. "columnNames": [
  4463. "characterId"
  4464. ],
  4465. "orders": [],
  4466. "createSql": "CREATE INDEX IF NOT EXISTS `index_chapter_speech_segments_characterId` ON `${TABLE_NAME}` (`characterId`)"
  4467. }
  4468. ]
  4469. },
  4470. {
  4471. "tableName": "cloud_tts_engines",
  4472. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `provider` TEXT NOT NULL, `baseUrl` TEXT NOT NULL DEFAULT '', `apiKey` TEXT NOT NULL DEFAULT '', `secretKey` TEXT NOT NULL DEFAULT '', `region` TEXT NOT NULL DEFAULT '', `appId` TEXT NOT NULL DEFAULT '', `model` TEXT NOT NULL DEFAULT '', `optionsJson` TEXT NOT NULL DEFAULT '{}', `enabled` INTEGER NOT NULL DEFAULT 1, `createdAt` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
  4473. "fields": [
  4474. {
  4475. "fieldPath": "id",
  4476. "columnName": "id",
  4477. "affinity": "TEXT",
  4478. "notNull": true
  4479. },
  4480. {
  4481. "fieldPath": "name",
  4482. "columnName": "name",
  4483. "affinity": "TEXT",
  4484. "notNull": true
  4485. },
  4486. {
  4487. "fieldPath": "provider",
  4488. "columnName": "provider",
  4489. "affinity": "TEXT",
  4490. "notNull": true
  4491. },
  4492. {
  4493. "fieldPath": "baseUrl",
  4494. "columnName": "baseUrl",
  4495. "affinity": "TEXT",
  4496. "notNull": true,
  4497. "defaultValue": "''"
  4498. },
  4499. {
  4500. "fieldPath": "apiKey",
  4501. "columnName": "apiKey",
  4502. "affinity": "TEXT",
  4503. "notNull": true,
  4504. "defaultValue": "''"
  4505. },
  4506. {
  4507. "fieldPath": "secretKey",
  4508. "columnName": "secretKey",
  4509. "affinity": "TEXT",
  4510. "notNull": true,
  4511. "defaultValue": "''"
  4512. },
  4513. {
  4514. "fieldPath": "region",
  4515. "columnName": "region",
  4516. "affinity": "TEXT",
  4517. "notNull": true,
  4518. "defaultValue": "''"
  4519. },
  4520. {
  4521. "fieldPath": "appId",
  4522. "columnName": "appId",
  4523. "affinity": "TEXT",
  4524. "notNull": true,
  4525. "defaultValue": "''"
  4526. },
  4527. {
  4528. "fieldPath": "model",
  4529. "columnName": "model",
  4530. "affinity": "TEXT",
  4531. "notNull": true,
  4532. "defaultValue": "''"
  4533. },
  4534. {
  4535. "fieldPath": "optionsJson",
  4536. "columnName": "optionsJson",
  4537. "affinity": "TEXT",
  4538. "notNull": true,
  4539. "defaultValue": "'{}'"
  4540. },
  4541. {
  4542. "fieldPath": "enabled",
  4543. "columnName": "enabled",
  4544. "affinity": "INTEGER",
  4545. "notNull": true,
  4546. "defaultValue": "1"
  4547. },
  4548. {
  4549. "fieldPath": "createdAt",
  4550. "columnName": "createdAt",
  4551. "affinity": "INTEGER",
  4552. "notNull": true
  4553. },
  4554. {
  4555. "fieldPath": "updatedAt",
  4556. "columnName": "updatedAt",
  4557. "affinity": "INTEGER",
  4558. "notNull": true
  4559. }
  4560. ],
  4561. "primaryKey": {
  4562. "autoGenerate": false,
  4563. "columnNames": [
  4564. "id"
  4565. ]
  4566. },
  4567. "indices": [
  4568. {
  4569. "name": "index_cloud_tts_engines_provider_enabled",
  4570. "unique": false,
  4571. "columnNames": [
  4572. "provider",
  4573. "enabled"
  4574. ],
  4575. "orders": [],
  4576. "createSql": "CREATE INDEX IF NOT EXISTS `index_cloud_tts_engines_provider_enabled` ON `${TABLE_NAME}` (`provider`, `enabled`)"
  4577. }
  4578. ]
  4579. },
  4580. {
  4581. "tableName": "exact_chapter_page_counts",
  4582. "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookId` TEXT NOT NULL, `chapterId` TEXT NOT NULL, `chapterIndex` INTEGER NOT NULL, `contentHash` INTEGER NOT NULL, `layoutSignature` INTEGER NOT NULL, `engineVersion` INTEGER NOT NULL, `pageCount` INTEGER NOT NULL, `updatedAt` INTEGER NOT NULL, PRIMARY KEY(`bookId`, `chapterId`, `layoutSignature`), FOREIGN KEY(`bookId`) REFERENCES `books`(`bookUrl`) ON UPDATE NO ACTION ON DELETE CASCADE )",
  4583. "fields": [
  4584. {
  4585. "fieldPath": "bookId",
  4586. "columnName": "bookId",
  4587. "affinity": "TEXT",
  4588. "notNull": true
  4589. },
  4590. {
  4591. "fieldPath": "chapterId",
  4592. "columnName": "chapterId",
  4593. "affinity": "TEXT",
  4594. "notNull": true
  4595. },
  4596. {
  4597. "fieldPath": "chapterIndex",
  4598. "columnName": "chapterIndex",
  4599. "affinity": "INTEGER",
  4600. "notNull": true
  4601. },
  4602. {
  4603. "fieldPath": "contentHash",
  4604. "columnName": "contentHash",
  4605. "affinity": "INTEGER",
  4606. "notNull": true
  4607. },
  4608. {
  4609. "fieldPath": "layoutSignature",
  4610. "columnName": "layoutSignature",
  4611. "affinity": "INTEGER",
  4612. "notNull": true
  4613. },
  4614. {
  4615. "fieldPath": "engineVersion",
  4616. "columnName": "engineVersion",
  4617. "affinity": "INTEGER",
  4618. "notNull": true
  4619. },
  4620. {
  4621. "fieldPath": "pageCount",
  4622. "columnName": "pageCount",
  4623. "affinity": "INTEGER",
  4624. "notNull": true
  4625. },
  4626. {
  4627. "fieldPath": "updatedAt",
  4628. "columnName": "updatedAt",
  4629. "affinity": "INTEGER",
  4630. "notNull": true
  4631. }
  4632. ],
  4633. "primaryKey": {
  4634. "autoGenerate": false,
  4635. "columnNames": [
  4636. "bookId",
  4637. "chapterId",
  4638. "layoutSignature"
  4639. ]
  4640. },
  4641. "indices": [
  4642. {
  4643. "name": "index_exact_chapter_page_counts_bookId_layoutSignature",
  4644. "unique": false,
  4645. "columnNames": [
  4646. "bookId",
  4647. "layoutSignature"
  4648. ],
  4649. "orders": [],
  4650. "createSql": "CREATE INDEX IF NOT EXISTS `index_exact_chapter_page_counts_bookId_layoutSignature` ON `${TABLE_NAME}` (`bookId`, `layoutSignature`)"
  4651. }
  4652. ],
  4653. "foreignKeys": [
  4654. {
  4655. "table": "books",
  4656. "onDelete": "CASCADE",
  4657. "onUpdate": "NO ACTION",
  4658. "columns": [
  4659. "bookId"
  4660. ],
  4661. "referencedColumns": [
  4662. "bookUrl"
  4663. ]
  4664. }
  4665. ]
  4666. }
  4667. ],
  4668. "views": [
  4669. {
  4670. "viewName": "book_sources_part",
  4671. "createSql": "CREATE VIEW `${VIEW_NAME}` AS select bookSourceUrl, bookSourceName, bookSourceGroup, customOrder, enabled, enabledExplore, \n (loginUrl is not null and trim(loginUrl) <> '') hasLoginUrl, lastUpdateTime, respondTime, weight, \n (exploreUrl is not null and trim(exploreUrl) <> '') hasExploreUrl \n from book_sources"
  4672. }
  4673. ],
  4674. "setupQueries": [
  4675. "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
  4676. "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '2526386cd72de142378cad9f0d86441c')"
  4677. ]
  4678. }
  4679. }