Browse Source

megratation pali_sent

visuddhinanda 4 years ago
parent
commit
b5c1c0b3a5
2 changed files with 23 additions and 0 deletions
  1. 3 0
      db/sqlite/pali_sent/down.sql
  2. 20 0
      db/sqlite/pali_sent/up.sql

+ 3 - 0
db/sqlite/pali_sent/down.sql

@@ -0,0 +1,3 @@
+
+DROP INDEX  IF EXISTS  palisentId ;
+DROP TABLE pali_sent ;

+ 20 - 0
db/sqlite/pali_sent/up.sql

@@ -0,0 +1,20 @@
+-- 表:pali_sent
+CREATE TABLE pali_sent (
+    id SERIAL PRIMARY KEY,
+    book      INTEGER,
+    paragraph INTEGER,
+    word_begin   INTEGER,
+    word_end     INTEGER,
+    length    INTEGER,
+    count     INTEGER,
+    text      TEXT,
+    html      TEXT,
+    sim_sents TEXT,
+    sim_sents_count INTEGER NOT NULL DEFAULT (0),
+    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+-- 索引:sentId
+CREATE INDEX palisentId ON pali_sent (book, paragraph, word_begin, word_end);
+