From 90b9afad93601ae3160f2f1cb6143a9b4be2fe25 Mon Sep 17 00:00:00 2001 From: is2-mendiratta <indivar2.mendiratta@live.uwe.ac.uk> Date: Tue, 29 Apr 2025 12:31:48 +0000 Subject: [PATCH] Delete newschema.sql --- newschema.sql | 198 -------------------------------------------------- 1 file changed, 198 deletions(-) delete mode 100644 newschema.sql diff --git a/newschema.sql b/newschema.sql deleted file mode 100644 index 978ac4d..0000000 --- a/newschema.sql +++ /dev/null @@ -1,198 +0,0 @@ --- MySQL dump 10.13 Distrib 5.7.24, for osx11.1 (x86_64) --- --- Host: localhost Database: compliance_checker --- ------------------------------------------------------ --- Server version 8.0.32 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `admin_activity_log` --- - -DROP TABLE IF EXISTS `admin_activity_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `admin_activity_log` ( - `id` int NOT NULL AUTO_INCREMENT, - `admin_id` int NOT NULL, - `action` varchar(255) NOT NULL, - `ip_address` varchar(45) DEFAULT NULL, - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `admin_id` (`admin_id`), - CONSTRAINT `admin_activity_log_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `admin_users` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `admin_users` --- - -DROP TABLE IF EXISTS `admin_users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `admin_users` ( - `id` int NOT NULL AUTO_INCREMENT, - `username` varchar(100) NOT NULL, - `email` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `role` enum('Admin','Super Admin') NOT NULL DEFAULT 'Admin', - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - `last_login` timestamp NULL DEFAULT NULL, - `is_active` tinyint(1) DEFAULT '1', - PRIMARY KEY (`id`), - UNIQUE KEY `email` (`email`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `questionnaire_answers` --- - -DROP TABLE IF EXISTS `questionnaire_answers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `questionnaire_answers` ( - `id` int NOT NULL AUTO_INCREMENT, - `user_id` int NOT NULL, - `question_id` int NOT NULL, - `question_text` text NOT NULL, - `answer` text NOT NULL, - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - `questionnaire_results_id` int DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - KEY `fk_questionnaire_results` (`questionnaire_results_id`), - CONSTRAINT `fk_questionnaire_results` FOREIGN KEY (`questionnaire_results_id`) REFERENCES `questionnaire_results` (`id`) ON DELETE CASCADE, - CONSTRAINT `questionnaire_answers_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=799 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `questionnaire_results` --- - -DROP TABLE IF EXISTS `questionnaire_results`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `questionnaire_results` ( - `id` int NOT NULL AUTO_INCREMENT, - `user_id` int DEFAULT NULL, - `company_name` varchar(255) DEFAULT NULL, - `industry` varchar(100) DEFAULT NULL, - `score` int DEFAULT NULL, - `compliance_percentage` float DEFAULT NULL, - `compliance_level` varchar(50) DEFAULT NULL, - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - `recommendations` json DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `questionnaire_results_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `scan_results` --- - -DROP TABLE IF EXISTS `scan_results`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `scan_results` ( - `id` int NOT NULL AUTO_INCREMENT, - `user_id` int DEFAULT NULL, - `scanned_url` varchar(255) DEFAULT NULL, - `compliance_level` varchar(50) DEFAULT NULL, - `compliance_percentage` float DEFAULT NULL, - `score` int DEFAULT NULL, - `results` json DEFAULT NULL, - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - `recommendations` json DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `scan_results_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_activity_log` --- - -DROP TABLE IF EXISTS `user_activity_log`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_activity_log` ( - `id` int NOT NULL AUTO_INCREMENT, - `user_id` int NOT NULL, - `action_type` varchar(50) NOT NULL, - `details` text, - `ip_address` varchar(45) DEFAULT NULL, - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `user_activity_log_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `user_logins` --- - -DROP TABLE IF EXISTS `user_logins`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user_logins` ( - `id` int NOT NULL AUTO_INCREMENT, - `user_id` int NOT NULL, - `ip_address` varchar(45) DEFAULT NULL, - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `user_logins_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `users` --- - -DROP TABLE IF EXISTS `users`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `users` ( - `id` int NOT NULL AUTO_INCREMENT, - `username` varchar(50) DEFAULT NULL, - `email` varchar(100) DEFAULT NULL, - `password` varchar(255) DEFAULT NULL, - `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - `last_name` varchar(50) NOT NULL, - `company_name` varchar(100) NOT NULL, - `job_title` varchar(100) NOT NULL, - `company_headcount` varchar(20) NOT NULL, - `company_city` varchar(50) NOT NULL, - `company_sector` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `email` (`email`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2025-04-24 17:25:15 -- GitLab