diff --git a/soap-service/db/soap_jahitin.sql b/soap-service/db/soap_jahitin.sql index 7fde7e609369d51d66ddc12de6283b2afa85ac80..ec17a7da2723c55d1a00248c859a5bde5b542445 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