From 10d8fceb77ba46e6595e6762f698f858f4edc6d1 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Sun, 25 Aug 2024 11:24:03 +0200 Subject: [PATCH] Fixed formatting errors in create_db.sql --- create_db.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/create_db.sql b/create_db.sql index 1a0f873..1fa3d1a 100644 --- a/create_db.sql +++ b/create_db.sql @@ -11,13 +11,13 @@ CREATE TABLE users ( first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, role INT NOT NULL, - PRIMARY KEY(id) + PRIMARY KEY (id) ); CREATE TABLE issues ( id INT AUTO_INCREMENT, published BOOL NOT NULL, - PRIMARY KEY(id) + PRIMARY KEY (id) ); CREATE TABLE articles ( @@ -30,21 +30,21 @@ CREATE TABLE articles ( rejected BOOL NOT NULL, author_id INT NOT NULL, issue_id INT NOT NULL, - PRIMARY KEY(id), - FOREIGN KEY(author_id) REFERENCES users(id), - FOREIGN KEY(issue_id) REFERENCES issues(id) + PRIMARY KEY (id), + FOREIGN KEY (author_id) REFERENCES users (id), + FOREIGN KEY (issue_id) REFERENCES issues (id) ); CREATE TABLE tags ( id INT AUTO_INCREMENT, name VARCHAR(50) NOT NULL UNIQUE, - PRIMARY KEY(id) + PRIMARY KEY (id) ); CREATE TABLE articles_tags ( article_id INT, tag_id INT, - PRIMARY KEY(article_id, tag_id), - FOREIGN KEY(article_id) REFERENCES articles(id), - FOREIGN KEY(tag_id) REFERENCES tags(id) + PRIMARY KEY (article_id, tag_id), + FOREIGN KEY (article_id) REFERENCES articles (id), + FOREIGN KEY (tag_id) REFERENCES tags (id) );