aboutsummaryrefslogtreecommitdiff
path: root/Database
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-04 07:51:34 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-04 07:51:34 +0000
commit8a458ba1f37d59983d4fedd2d4dd966bb08105b4 (patch)
treede5ccf0360e0657e6526586ae2a3c1e2224634d4 /Database
parent96d6c8a951d93fa7b71ffd2d15e37ec17591ae46 (diff)
downloadnewsaggregator-8a458ba1f37d59983d4fedd2d4dd966bb08105b4.tar.gz
newsaggregator-8a458ba1f37d59983d4fedd2d4dd966bb08105b4.tar.bz2
newsaggregator-8a458ba1f37d59983d4fedd2d4dd966bb08105b4.zip
Changed SQL to use PrimaryKey()
Diffstat (limited to 'Database')
-rw-r--r--Database/SQL/article.sql6
-rw-r--r--Database/SQL/config.sql6
2 files changed, 8 insertions, 4 deletions
diff --git a/Database/SQL/article.sql b/Database/SQL/article.sql
index 0f95cc4..5b3de4a 100644
--- a/Database/SQL/article.sql
+++ b/Database/SQL/article.sql
@@ -1,9 +1,11 @@
CREATE TABLE article (
- id NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ article_id INT NOT NULL,
title VARCHAR(255),
description VARCHAR(255),
image_link VARCHAR(128),
article_link VARCHAR(64),
source VARCHAR(8),
- publish_date DATE
+ publish_date DATE,
+
+ PRIMARY KEY(article_id)
) \ No newline at end of file
diff --git a/Database/SQL/config.sql b/Database/SQL/config.sql
index 579c633..4a8296f 100644
--- a/Database/SQL/config.sql
+++ b/Database/SQL/config.sql
@@ -1,9 +1,11 @@
CREATE TABLE config (
- id NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ config_id INT NOT NULL,
title INT,
description INT,
image_link INT,
article_link INT,
source INT,
- publish_date INT
+ publish_date INT,
+
+ PRIMARY KEY(config_id)
) \ No newline at end of file