Нет описания

1234567891011121314151617181920212223242526272829
  1. DROP TABLE IF EXISTS station;
  2. DROP TABLE IF EXISTS user;
  3. DROP TABLE IF EXISTS turn;
  4. CREATE TABLE station (
  5. s_id INTEGER PRIMARY KEY AUTOINCREMENT,
  6. nombre_empleado CHAR(20) NOT NULL,
  7. oficina CHAR(20) NOT NULL,
  8. last_turn INTEGER NOT NULL
  9. );
  10. CREATE TABLE user (
  11. u_id INTEGER PRIMARY KEY AUTOINCREMENT,
  12. uName CHAR(20) NOT NULL,
  13. isAdmin BIT NOT NULL,
  14. email CHAR(30) NOT NULL
  15. );
  16. CREATE TABLE turno (
  17. t_id INTEGER PRIMARY KEY AUTOINCREMENT,
  18. cName CHAR(20) NOT NULL,
  19. cEmail CHAR(30) NOT NULL,
  20. purpose CHAR(40),
  21. timeArrival CHAR(5) NOT NULL,
  22. timeEnter CHAR(5),
  23. station INTEGER NOT NULL,
  24. FOREIGN KEY (station) REFERENCES station (s_id)
  25. );