up.sql 539 B

1234567891011121314151617181920
  1. -- Your SQL goes here
  2. -- 表:wordindex
  3. CREATE TABLE word_indexs
  4. (
  5. id SERIAL PRIMARY KEY,
  6. word TEXT NOT NULL UNIQUE,
  7. word_en TEXT NOT NULL,
  8. count INTEGER NOT NULL DEFAULT (0),
  9. normal INTEGER NOT NULL DEFAULT (0),
  10. bold INTEGER NOT NULL DEFAULT (0),
  11. is_base INTEGER NOT NULL DEFAULT (0),
  12. len INTEGER NOT NULL DEFAULT (0),
  13. final INTEGER,
  14. created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
  15. );
  16. -- 索引:
  17. CREATE INDEX word_indexs_worden ON word_indexs (word_en);
  18. CREATE INDEX word_indexs_word ON word_indexs (word);