up.sql 604 B

123456789101112131415161718192021
  1. -- 表:pali_sent
  2. CREATE TABLE pali_sent_org (
  3. id SERIAL PRIMARY KEY,
  4. book INTEGER,
  5. paragraph INTEGER,
  6. word_begin INTEGER,
  7. word_end INTEGER,
  8. length INTEGER,
  9. count INTEGER,
  10. text TEXT,
  11. html TEXT,
  12. cell INTEGER NOT NULL DEFAULT (1),
  13. sim_sents TEXT,
  14. sim_sents_count INTEGER NOT NULL DEFAULT (0),
  15. created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  16. updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
  17. );
  18. -- 索引:sentId
  19. CREATE INDEX pali_sent_org_uid ON pali_sent_org (book, paragraph, word_begin, word_end);