extra.sql 836 B

123456789101112131415161718192021222324252627282930
  1. -- Extra DB changes needed for new features in work tool
  2. CREATE TABLE IF NOT EXISTS c_student_publication_rel_document (
  3. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  4. work_id INT NOT NULL,
  5. document_id INT NOT NULL,
  6. c_id INT NOT NULL
  7. );
  8. CREATE TABLE IF NOT EXISTS c_student_publication_rel_user (
  9. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  10. work_id INT NOT NULL,
  11. user_id INT NOT NULL,
  12. c_id INT NOT NULL
  13. );
  14. CREATE TABLE IF NOT EXISTS c_student_publication_comment (
  15. id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  16. work_id INT NOT NULL,
  17. c_id INT NOT NULL,
  18. comment text,
  19. file VARCHAR(255),
  20. user_id int NOT NULL,
  21. sent_at datetime NOT NULL
  22. );
  23. ALTER TABLE c_student_publication ADD COLUMN document_id int DEFAULT 0;
  24. -- Update configuration.php:
  25. -- $_configuration['add_document_to_work'] = true;