No Description

schema.sql 689B

123456789101112131415161718192021222324252627282930
  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. turn INTEGER NOT NULL,
  22. timeArrival CHAR(5) NOT NULL,
  23. timeEnter CHAR(5),
  24. station INTEGER NOT NULL,
  25. FOREIGN KEY (station) REFERENCES station (s_id)
  26. );