104.json 147 KB

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