oracle.sql 739 B

1234567891011121314151617181920212223242526
  1. -- 用户表
  2. CREATE TABLE tb_user (
  3. user_id NUMBER(20, 0) NOT NULL,
  4. username varchar2(50) NOT NULL,
  5. mobile varchar2(20) NOT NULL,
  6. password varchar2(64),
  7. create_time timestamp,
  8. PRIMARY KEY (user_id)
  9. );
  10. CREATE UNIQUE INDEX index_username on tb_user(username);
  11. -- 用户Token表
  12. CREATE TABLE tb_token (
  13. user_id NUMBER(20, 0) NOT NULL,
  14. token varchar2(100) NOT NULL,
  15. expire_time timestamp,
  16. update_time timestamp,
  17. PRIMARY KEY (user_id)
  18. );
  19. CREATE UNIQUE INDEX index_token on tb_token(token);
  20. -- 账号:13612345678 密码:admin
  21. INSERT INTO tb_user (user_id, username, mobile, password, create_time) VALUES (1, 'mark', '13612345678', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', CURRENT_DATE);