Skip to content

Commit

Permalink
Merge pull request #115 from NSWC-Crane/CHRIS_DEV
Browse files Browse the repository at this point in the history
Clean slate for beta
  • Loading branch information
crodriguez6497 authored Nov 18, 2024
2 parents 8e0a488 + 2115f31 commit 4796cd6
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 166 deletions.
21 changes: 0 additions & 21 deletions api/Services/migrations/0000.js

This file was deleted.

23 changes: 0 additions & 23 deletions api/Services/migrations/0001.js

This file was deleted.

27 changes: 0 additions & 27 deletions api/Services/migrations/0002.js

This file was deleted.

19 changes: 0 additions & 19 deletions api/Services/migrations/0003.js

This file was deleted.

27 changes: 0 additions & 27 deletions api/Services/migrations/0004.js

This file was deleted.

19 changes: 0 additions & 19 deletions api/Services/migrations/0005.js

This file was deleted.

19 changes: 0 additions & 19 deletions api/Services/migrations/0006.js

This file was deleted.

32 changes: 23 additions & 9 deletions api/Services/migrations/sql/current/10-cpat-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CREATE TABLE `assetlabels` (
DROP TABLE IF EXISTS `assignedteams`;
CREATE TABLE `assignedteams` (
`assignedTeamId` int NOT NULL AUTO_INCREMENT,
`assignedTeamName` varchar(50) NOT NULL,
`assignedTeamName` varchar(100) NOT NULL,
PRIMARY KEY (`assignedTeamId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

Expand All @@ -90,6 +90,10 @@ CREATE TABLE `collection` (
`collectionId` int NOT NULL AUTO_INCREMENT,
`collectionName` varchar(50) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`systemType` varchar(100) DEFAULT NULL,
`systemName` varchar(100) DEFAULT NULL,
`ccsafa` varchar(100) DEFAULT NULL,
`aaPackage` varchar(100) DEFAULT NULL,
`created` datetime DEFAULT CURRENT_TIMESTAMP,
`collectionOrigin` varchar(15) DEFAULT 'C-PAT',
`originCollectionId` int DEFAULT NULL,
Expand Down Expand Up @@ -225,7 +229,7 @@ CREATE TABLE `poam` (
`iavmNumber` varchar(25) DEFAULT '',
`iavComplyByDate` date DEFAULT NULL,
`taskOrderNumber` varchar(25) DEFAULT NULL,
`stigTitle` varchar(255) DEFAULT NULL,
`vulnerabilityTitle` varchar(255) DEFAULT NULL,
`stigBenchmarkId` varchar(255) DEFAULT NULL,
`stigCheckData` text,
`tenablePluginData` text,
Expand All @@ -238,13 +242,13 @@ CREATE TABLE `poam` (
`predisposingConditions` varchar(2000) DEFAULT '',
`severity` varchar(25) DEFAULT '',
`likelihood` varchar(15) DEFAULT '',
`localImpact` varchar(15) DEFAULT '',
`impactDescription` varchar(2000) DEFAULT '',
`extensionTimeAllowed` int DEFAULT '0',
`extensionJustification` varchar(2000) DEFAULT '',
`hqs` tinyint(1) NOT NULL DEFAULT '0',
`created` date NOT NULL DEFAULT (curdate()),
`lastUpdated` date DEFAULT NULL,
`notes` varchar(500) DEFAULT '',
PRIMARY KEY (`poamId`),
UNIQUE KEY `poamID_UNIQUE` (`poamId`),
KEY `idx_poam_collectionId` (`collectionId`),
Expand Down Expand Up @@ -460,6 +464,18 @@ DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;

--
-- Table structure for table `poamassociatedvulnerabilities`
--

DROP TABLE IF EXISTS `poamassociatedvulnerabilities`;
CREATE TABLE `poamassociatedvulnerabilities` (
`poamId` int NOT NULL,
`associatedVulnerability` varchar(15) NOT NULL,
PRIMARY KEY (`poamId`,`associatedVulnerability`),
CONSTRAINT `fk_poam_vulnerability` FOREIGN KEY (`poamId`) REFERENCES `poam` (`poamId`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Table structure for table `poamattachments`
--
Expand Down Expand Up @@ -637,7 +653,8 @@ DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`userId` int NOT NULL AUTO_INCREMENT,
`userName` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL DEFAULT '',
`email` varchar(100) NOT NULL DEFAULT 'None Provided',
`phoneNumber` varchar(20) NOT NULL DEFAULT '',
`firstName` varchar(50) NOT NULL DEFAULT '',
`lastName` varchar(50) NOT NULL DEFAULT ' ',
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
Expand All @@ -647,14 +664,11 @@ CREATE TABLE `user` (
`fullName` varchar(100) DEFAULT NULL,
`officeOrg` varchar(100) DEFAULT 'UNKNOWN',
`defaultTheme` varchar(50) DEFAULT 'lara-dark-blue',
`isAdmin` int NOT NULL DEFAULT '0',
`lastClaims` json DEFAULT (_utf8mb4'{}'),
`points` int NOT NULL DEFAULT '0',
PRIMARY KEY (`userId`),
UNIQUE KEY `userEmail_UNIQUE` (`email`) USING BTREE,
UNIQUE KEY `userName_UNIQUE` (`userName`),
KEY `idx_user_userName` (`userName`),
KEY `idx_user_email` (`email`)
KEY `idx_user_userName` (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

Expand All @@ -664,4 +678,4 @@ CREATE TABLE `user` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-09-25 17:28:18
-- Dump completed on 2024-11-18 11:46:49
3 changes: 1 addition & 2 deletions api/Services/migrations/sql/current/20-cpat-static.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

LOCK TABLES `_migrations` WRITE;
/*!40000 ALTER TABLE `_migrations` DISABLE KEYS */;
INSERT INTO `_migrations` VALUES ('2024-09-24 11:51:19',NULL,'0000.js'),('2024-09-24 12:13:34',NULL,'0001.js'),('2024-09-25 15:05:38',NULL,'0002.js');
/*!40000 ALTER TABLE `_migrations` ENABLE KEYS */;
UNLOCK TABLES;

Expand All @@ -39,4 +38,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-09-25 17:28:18
-- Dump completed on 2024-11-18 11:46:49

0 comments on commit 4796cd6

Please sign in to comment.