100.json 144 KB

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