2
0

sentence.sql 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : Sentence
  4. Source Server Type : SQLite
  5. Source Server Version : 3035005 (3.35.5)
  6. Source Schema : main
  7. Target Server Type : SQLite
  8. Target Server Version : 3035005 (3.35.5)
  9. File Encoding : 65001
  10. Date: 17/08/2023 11:52:09
  11. */
  12. PRAGMA foreign_keys = false;
  13. -- ----------------------------
  14. -- Table structure for channel
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS "channel";
  17. CREATE TABLE "channel" (
  18. "id" VARCHAR,
  19. "name" VARCHAR,
  20. "type" VARCHAR,
  21. "language" VARCHAR,
  22. "summary" VARCHAR,
  23. "owner_id" VARCHAR,
  24. "setting" VARCHAR,
  25. "created_at" DATE,
  26. PRIMARY KEY ("id")
  27. );
  28. -- ----------------------------
  29. -- Table structure for chapter
  30. -- ----------------------------
  31. DROP TABLE IF EXISTS "chapter";
  32. CREATE TABLE "chapter" (
  33. "id" VARCHAR,
  34. "book" INTEGER,
  35. "paragraph" INTEGER,
  36. "language" VARCHAR,
  37. "title" TEXT,
  38. "channel_id" VARCHAR,
  39. "progress" DOUBLE,
  40. "updated_at" DATE
  41. );
  42. -- ----------------------------
  43. -- Table structure for pali_text
  44. -- ----------------------------
  45. DROP TABLE IF EXISTS "pali_text";
  46. CREATE TABLE "pali_text" (
  47. "id" VARCHAR,
  48. "book" INTEGER,
  49. "paragraph" INTEGER,
  50. "level" INTEGER,
  51. "toc" VARCHAR,
  52. "chapter_len" INTEGER,
  53. "parent" INTEGER,
  54. PRIMARY KEY ("id")
  55. );
  56. -- ----------------------------
  57. -- Table structure for sentence
  58. -- ----------------------------
  59. DROP TABLE IF EXISTS "sentence";
  60. CREATE TABLE "sentence" (
  61. "book" INTEGER,
  62. "paragraph" INTEGER,
  63. "word_start" INTEGER,
  64. "word_end" INTEGER,
  65. "content" VARCHAR,
  66. "channel_id" VARCHAR
  67. );
  68. -- ----------------------------
  69. -- Table structure for sentence_translation
  70. -- ----------------------------
  71. DROP TABLE IF EXISTS "sentence_translation";
  72. CREATE TABLE "sentence_translation" (
  73. "book" INTEGER,
  74. "paragraph" INTEGER,
  75. "word_start" INTEGER,
  76. "word_end" INTEGER,
  77. "content" VARCHAR,
  78. "channel_id" VARCHAR
  79. );
  80. -- ----------------------------
  81. -- Table structure for tag
  82. -- ----------------------------
  83. DROP TABLE IF EXISTS "tag";
  84. CREATE TABLE "tag" (
  85. "id" VARCHAR,
  86. "name" VARCHAR,
  87. "description" TIME,
  88. "color" INTEGER,
  89. "owner_id" VARCHAR,
  90. PRIMARY KEY ("id")
  91. );
  92. -- ----------------------------
  93. -- Table structure for tag_map
  94. -- ----------------------------
  95. DROP TABLE IF EXISTS "tag_map";
  96. CREATE TABLE "tag_map" (
  97. "anchor_id" VARCHAR,
  98. "tag_id" VARCHAR
  99. );
  100. -- ----------------------------
  101. -- Indexes structure for table channel
  102. -- ----------------------------
  103. CREATE INDEX "channel_id"
  104. ON "channel" (
  105. "id" ASC
  106. );
  107. -- ----------------------------
  108. -- Indexes structure for table chapter
  109. -- ----------------------------
  110. CREATE INDEX "book"
  111. ON "chapter" (
  112. "book" DESC
  113. );
  114. -- ----------------------------
  115. -- Indexes structure for table pali_text
  116. -- ----------------------------
  117. CREATE UNIQUE INDEX "bp"
  118. ON "pali_text" (
  119. "book" ASC,
  120. "paragraph" ASC
  121. );
  122. CREATE UNIQUE INDEX "id"
  123. ON "pali_text" (
  124. "id" DESC
  125. );
  126. -- ----------------------------
  127. -- Indexes structure for table sentence
  128. -- ----------------------------
  129. CREATE INDEX "bps"
  130. ON "sentence" (
  131. "book" ASC,
  132. "paragraph" ASC
  133. );
  134. -- ----------------------------
  135. -- Indexes structure for table sentence_translation
  136. -- ----------------------------
  137. CREATE INDEX "bpst"
  138. ON "sentence_translation" (
  139. "book" ASC,
  140. "paragraph" ASC
  141. );
  142. -- ----------------------------
  143. -- Indexes structure for table tag
  144. -- ----------------------------
  145. CREATE UNIQUE INDEX "name"
  146. ON "tag" (
  147. "name" ASC
  148. );
  149. -- ----------------------------
  150. -- Indexes structure for table tag_map
  151. -- ----------------------------
  152. CREATE INDEX "tag_id"
  153. ON "tag_map" (
  154. "tag_id" DESC
  155. );
  156. PRAGMA foreign_keys = true;