up.sql 481 B

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