Updated DB Schema to include the beginnings of asset, contact, vendor and software related data

This commit is contained in:
johnnyq
2022-05-10 17:12:52 -04:00
parent 33b18891bc
commit 06ae05f4f2
3 changed files with 196 additions and 4 deletions

170
db.sql
View File

@@ -55,6 +55,48 @@ CREATE TABLE `api_keys` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `asset_documents`
--
DROP TABLE IF EXISTS `asset_documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asset_documents` (
`asset_id` int(11) NOT NULL,
`document_id` int(11) NOT NULL,
PRIMARY KEY (`asset_id`,`document_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `asset_files`
--
DROP TABLE IF EXISTS `asset_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asset_files` (
`asset_id` int(11) NOT NULL,
`file_id` int(11) NOT NULL,
PRIMARY KEY (`asset_id`,`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `asset_logins`
--
DROP TABLE IF EXISTS `asset_logins`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `asset_logins` (
`asset_id` int(11) NOT NULL,
`login_id` int(11) NOT NULL,
PRIMARY KEY (`asset_id`,`login_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `assets`
--
@@ -275,6 +317,48 @@ CREATE TABLE `companies` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `contact_documents`
--
DROP TABLE IF EXISTS `contact_documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact_documents` (
`contact_id` int(11) NOT NULL,
`document_id` int(11) NOT NULL,
PRIMARY KEY (`contact_id`,`document_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `contact_files`
--
DROP TABLE IF EXISTS `contact_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact_files` (
`contact_id` int(11) NOT NULL,
`file_id` int(11) NOT NULL,
PRIMARY KEY (`contact_id`,`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `contact_logins`
--
DROP TABLE IF EXISTS `contact_logins`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact_logins` (
`contact_id` int(11) NOT NULL,
`login_id` int(11) NOT NULL,
PRIMARY KEY (`contact_id`,`login_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `contacts`
--
@@ -1106,6 +1190,48 @@ CREATE TABLE `software_contacts` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `software_documents`
--
DROP TABLE IF EXISTS `software_documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `software_documents` (
`software_id` int(11) NOT NULL,
`document_id` int(11) NOT NULL,
PRIMARY KEY (`software_id`,`document_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `software_files`
--
DROP TABLE IF EXISTS `software_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `software_files` (
`software_id` int(11) NOT NULL,
`file_id` int(11) NOT NULL,
PRIMARY KEY (`software_id`,`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `software_logins`
--
DROP TABLE IF EXISTS `software_logins`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `software_logins` (
`software_id` int(11) NOT NULL,
`login_id` int(11) NOT NULL,
PRIMARY KEY (`software_id`,`login_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tags`
--
@@ -1333,6 +1459,48 @@ CREATE TABLE `users` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vendor_documents`
--
DROP TABLE IF EXISTS `vendor_documents`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendor_documents` (
`vendor_id` int(11) NOT NULL,
`document_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_id`,`document_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vendor_files`
--
DROP TABLE IF EXISTS `vendor_files`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendor_files` (
`vendor_id` int(11) NOT NULL,
`file_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_id`,`file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vendor_logins`
--
DROP TABLE IF EXISTS `vendor_logins`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendor_logins` (
`vendor_id` int(11) NOT NULL,
`login_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_id`,`login_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `vendors`
--
@@ -1375,4 +1543,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-05-07 20:50:30
-- Dump completed on 2022-05-10 17:11:18