From 430bb63ea3aadf4bacf72b7b678f965f64edab3b Mon Sep 17 00:00:00 2001 From: lostgirrlll <13521030@std.stei.itb.ac.id> Date: Fri, 17 Nov 2023 14:14:35 +0700 Subject: [PATCH] feat: update sql --- soap-service/db/soap_jahitin.sql | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/soap-service/db/soap_jahitin.sql b/soap-service/db/soap_jahitin.sql index 7fde7e6..ec17a7d 100644 --- a/soap-service/db/soap_jahitin.sql +++ b/soap-service/db/soap_jahitin.sql @@ -3,18 +3,13 @@ CREATE TABLE IF NOT EXISTS `logging` ( `description` varchar(255) NOT NULL, `ip` varchar(128) NOT NULL, `endpoint` varchar(255) NOT NULL, - `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), + `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) -) +); CREATE TABLE IF NOT EXISTS `subscription` ( - `subscriber_id` int NOT NULL, + `subscriber_id` int AUTO_INCREMENT NOT NULL, + `user_id` int NOT NULL, `status` enum('ACCEPTED','REJECTED','PENDING') NOT NULL DEFAULT 'PENDING', PRIMARY KEY (subscriber_id) -) - -INSERT INTO `logging` (`id`, `description`, `ip`, `endpoint`, `timestamp`) VALUES -('123123', 'ini testing saja','192.168.0.1','localhost','2022-11-27 21:00:00'), -('123124', 'ini testing saja','192.168.0.1','localhost','2022-11-27 22:00:00'), -('123125', 'ini testing saja','192.168.0.1','localhost','2022-11-27 23:00:00'), -('123126', 'ini testing saja','192.168.0.1','localhost','2022-11-27 01:00:00') \ No newline at end of file +); \ No newline at end of file -- GitLab