Permet de poster un commentaire sans être connecté
This commit is contained in:
@@ -20,7 +20,9 @@ CREATE TABLE comment (
|
||||
news_id INT NOT NULL,
|
||||
publication_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
content TEXT NOT NULL,
|
||||
author_id INT NOT NULL,
|
||||
author_id INT NULL,
|
||||
author_name VARCHAR(32) NULL,
|
||||
CONSTRAINT either_authors CHECK ((author_id IS NULL) != (author_name IS NULL)),
|
||||
FOREIGN KEY (news_id) REFERENCES news(id_news)
|
||||
ON DELETE CASCADE,
|
||||
FOREIGN KEY (author_id) REFERENCES registered_user(id_user)
|
||||
|
Reference in New Issue
Block a user