up.sql 460 B

1234567891011121314151617181920
  1. -- 表:word
  2. CREATE TABLE word
  3. (
  4. id SERIAL PRIMARY KEY,
  5. sn INTEGER NOT NULL ,
  6. book INTEGER NOT NULL,
  7. paragraph INTEGER NOT NULL,
  8. wordindex INTEGER NOT NULL,
  9. bold INTEGER NOT NULL DEFAULT (0),
  10. weight INTEGER NOT NULL DEFAULT (1),
  11. created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
  12. );
  13. -- 索引:pali
  14. CREATE INDEX word_book_paragraph ON word (book, paragraph);
  15. -- 索引:wordindex1
  16. CREATE INDEX word_wordindex ON word (wordindex);