sql.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. create database G01_0350;
  2. use G01_0350;
  3. CREATE TABLE IF NOT EXISTS user_tbl(
  4. id INT UNSIGNED AUTO_INCREMENT,
  5. name VARCHAR(20) NOT NULL,
  6. password VARCHAR(100) NULL,
  7. PRIMARY KEY ( id )
  8. )ENGINE=InnoDB DEFAULT CHARSET=utf8;
  9. INSERT INTO user_tbl (name,password) VALUES('admin', '123456');
  10. CREATE TABLE IF NOT EXISTS order_tbl(
  11. id INT UNSIGNED AUTO_INCREMENT,
  12. order_num VARCHAR(30) NOT NULL,
  13. product_idx INT NOT NULL,
  14. product_name VARCHAR(30) NOT NULL,
  15. batch VARCHAR(10) NOT NULL,
  16. team VARCHAR(2) NOT NULL,
  17. ok INT NOT NULL,
  18. ng INT NOT NULL,
  19. targe INT NOT NULL,
  20. snp INT NOT NULL,
  21. begin_time BIGINT NOT NULL,
  22. end_time BIGINT,
  23. stat BOOL NOT NULL,
  24. PRIMARY KEY ( id )
  25. )ENGINE=InnoDB DEFAULT CHARSET=utf8;
  26. CREATE TABLE IF NOT EXISTS product_tbl(
  27. id INT UNSIGNED AUTO_INCREMENT,
  28. product_idx INT NOT NULL,
  29. product_name VARCHAR(30) NOT NULL,
  30. 17700_name VARCHAR(30) NOT NULL,
  31. 17720_name VARCHAR(30) NOT NULL,
  32. stat BOOL NOT NULL,
  33. PRIMARY KEY ( id )
  34. )ENGINE=InnoDB DEFAULT CHARSET=utf8;
  35. CREATE TABLE IF NOT EXISTS product_param_tbl(
  36. id INT UNSIGNED AUTO_INCREMENT,
  37. product_idx INT NOT NULL,
  38. product_name VARCHAR(30) NOT NULL,
  39. param_type INT NOT NULL,
  40. startuptime VARCHAR(10),
  41. airtime VARCHAR(10),
  42. presstime VARCHAR(10),
  43. testtime VARCHAR(10),
  44. exhaust VARCHAR(10),
  45. maxpress VARCHAR(10),
  46. minpress VARCHAR(10),
  47. setpress VARCHAR(10),
  48. capacity VARCHAR(10),
  49. posthreshold VARCHAR(10),
  50. pnegthreshold VARCHAR(10),
  51. PRIMARY KEY ( id )
  52. )ENGINE=InnoDB DEFAULT CHARSET=utf8;
  53. CREATE TABLE IF NOT EXISTS product_data_tbl(
  54. id INT UNSIGNED AUTO_INCREMENT,
  55. batch VARCHAR(20) NOT NULL,
  56. serial VARCHAR(20) NOT NULL,
  57. product_name VARCHAR(30) NOT NULL,
  58. testok BOOL NOT NULL,
  59. data_17700 VARCHAR(50) NOT NULL,
  60. data_17720 VARCHAR(50) NOT NULL,
  61. team VARCHAR(2) NOT NULL,
  62. tester VARCHAR(10) NOT NULL,
  63. begin_time BIGINT NOT NULL,
  64. end_time BIGINT NOT NULL,
  65. stat BOOL NOT NULL,
  66. PRIMARY KEY ( id ),
  67. INDEX batch_index (batch(12))
  68. )ENGINE=InnoDB DEFAULT CHARSET=utf8;
  69. exit;