Changed name deleted_at to archived_at as the record will not get deleted DB Structure update

This commit is contained in:
johnny@pittpc.com 2021-02-06 16:03:56 -05:00
parent 2ea809b4e7
commit 7ef971416f
1 changed files with 35 additions and 35 deletions

70
db.sql
View File

@ -29,7 +29,7 @@ CREATE TABLE `accounts` (
`account_notes` text DEFAULT NULL,
`account_created_at` datetime NOT NULL,
`account_updated_at` datetime DEFAULT NULL,
`account_deleted_at` datetime DEFAULT NULL,
`account_archived_at` datetime DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -76,7 +76,7 @@ CREATE TABLE `assets` (
`asset_notes` text DEFAULT NULL,
`asset_created_at` datetime NOT NULL,
`asset_updated_at` datetime DEFAULT NULL,
`asset_deleted_at` datetime DEFAULT NULL,
`asset_archived_at` datetime DEFAULT NULL,
`login_id` int(11) DEFAULT NULL,
`vendor_id` int(11) DEFAULT NULL,
`location_id` int(11) DEFAULT NULL,
@ -101,7 +101,7 @@ CREATE TABLE `calendars` (
`calendar_color` varchar(200) NOT NULL,
`calendar_created_at` datetime NOT NULL,
`calendar_updated_at` datetime DEFAULT NULL,
`calendar_deleted_at` datetime DEFAULT NULL,
`calendar_archived_at` datetime DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`calendar_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -121,7 +121,7 @@ CREATE TABLE `categories` (
`category_color` varchar(200) DEFAULT NULL,
`category_created_at` datetime NOT NULL,
`category_updated_at` datetime DEFAULT NULL,
`category_deleted_at` datetime DEFAULT NULL,
`category_archived_at` datetime DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -143,7 +143,7 @@ CREATE TABLE `certificates` (
`certificate_notes` text DEFAULT NULL,
`certificate_created_at` datetime NOT NULL,
`certificate_updated_at` datetime DEFAULT NULL,
`certificate_deleted_at` datetime DEFAULT NULL,
`certificate_archived_at` datetime DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`certificate_id`)
@ -177,7 +177,7 @@ CREATE TABLE `clients` (
`client_notes` text DEFAULT NULL,
`client_created_at` datetime NOT NULL,
`client_updated_at` datetime DEFAULT NULL,
`client_deleted_at` datetime DEFAULT NULL,
`client_archived_at` datetime DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@ -204,7 +204,7 @@ CREATE TABLE `companies` (
`company_logo` varchar(250) DEFAULT NULL,
`company_created_at` datetime NOT NULL,
`company_updated_at` datetime DEFAULT NULL,
`company_deleted_at` datetime DEFAULT NULL,
`company_archived_at` datetime DEFAULT NULL,
PRIMARY KEY (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -231,7 +231,7 @@ CREATE TABLE `contacts` (
`contact_inactive` tinyint(1) NOT NULL DEFAULT 0,
`contact_created_at` datetime NOT NULL,
`contact_updated_at` datetime DEFAULT NULL,
`contact_deleted_at` datetime DEFAULT NULL,
`contact_archived_at` datetime DEFAULT NULL,
`location_id` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -252,7 +252,7 @@ CREATE TABLE `documents` (
`document_details` text NOT NULL,
`document_created_at` datetime NOT NULL,
`document_updated_at` datetime DEFAULT NULL,
`document_deleted_at` datetime DEFAULT NULL,
`document_archived_at` datetime DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`document_id`)
@ -272,7 +272,7 @@ CREATE TABLE `domains` (
`domain_expire` date DEFAULT NULL,
`domain_created_at` datetime NOT NULL,
`domain_updated_at` datetime DEFAULT NULL,
`domain_deleted_at` datetime DEFAULT NULL,
`domain_archived_at` datetime DEFAULT NULL,
`domain_registrar` int(11) DEFAULT NULL,
`domain_webhost` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
@ -295,7 +295,7 @@ CREATE TABLE `events` (
`event_end` datetime DEFAULT NULL,
`event_created_at` datetime NOT NULL,
`event_updated_at` datetime DEFAULT NULL,
`event_deleted_at` datetime DEFAULT NULL,
`event_archived_at` datetime DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`location_id` int(11) DEFAULT NULL,
`calendar_id` int(11) NOT NULL,
@ -321,7 +321,7 @@ CREATE TABLE `expenses` (
`expense_receipt` varchar(200) DEFAULT NULL,
`expense_created_at` datetime NOT NULL,
`expense_updated_at` datetime DEFAULT NULL,
`expense_deleted_at` datetime DEFAULT NULL,
`expense_archived_at` datetime DEFAULT NULL,
`vendor_id` int(11) DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`asset_id` int(11) DEFAULT NULL,
@ -346,7 +346,7 @@ CREATE TABLE `files` (
`file_ext` varchar(200) DEFAULT NULL,
`file_created_at` datetime NOT NULL,
`file_updated_at` datetime DEFAULT NULL,
`file_deleted_at` datetime DEFAULT NULL,
`file_archived_at` datetime DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`file_id`)
@ -366,7 +366,7 @@ CREATE TABLE `history` (
`history_status` varchar(200) NOT NULL,
`history_description` varchar(200) NOT NULL,
`history_created_at` datetime NOT NULL,
`history_deleted_at` datetime DEFAULT NULL,
`history_archived_at` datetime DEFAULT NULL,
`invoice_id` int(11) DEFAULT NULL,
`recurring_id` int(11) DEFAULT NULL,
`quote_id` int(11) DEFAULT NULL,
@ -393,7 +393,7 @@ CREATE TABLE `invoice_items` (
`item_total` decimal(15,2) NOT NULL,
`item_created_at` datetime NOT NULL,
`item_updated_at` datetime DEFAULT NULL,
`item_deleted_at` datetime DEFAULT NULL,
`item_archived_at` datetime DEFAULT NULL,
`tax_id` int(11) DEFAULT NULL,
`quote_id` int(11) DEFAULT NULL,
`recurring_id` int(11) DEFAULT NULL,
@ -422,7 +422,7 @@ CREATE TABLE `invoices` (
`invoice_url_key` varchar(200) DEFAULT NULL,
`invoice_created_at` datetime NOT NULL,
`invoice_updated_at` datetime DEFAULT NULL,
`invoice_deleted_at` datetime DEFAULT NULL,
`invoice_archived_at` datetime DEFAULT NULL,
`category_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -452,7 +452,7 @@ CREATE TABLE `locations` (
`location_primary` tinyint(1) DEFAULT NULL,
`location_created_at` datetime NOT NULL,
`location_updated_at` datetime DEFAULT NULL,
`location_deleted_at` datetime DEFAULT NULL,
`location_archived_at` datetime DEFAULT NULL,
`contact_id` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -477,7 +477,7 @@ CREATE TABLE `logins` (
`login_note` text DEFAULT NULL,
`login_created_at` datetime NOT NULL,
`login_updated_at` datetime DEFAULT NULL,
`login_deleted_at` datetime DEFAULT NULL,
`login_archived_at` datetime DEFAULT NULL,
`vendor_id` int(11) DEFAULT NULL,
`asset_id` int(11) DEFAULT NULL,
`software_id` int(11) DEFAULT NULL,
@ -500,7 +500,7 @@ CREATE TABLE `logs` (
`log_action` varchar(255) NOT NULL,
`log_description` varchar(255) NOT NULL,
`log_created_at` datetime NOT NULL,
`log_deleted_at` datetime DEFAULT NULL,
`log_archived_at` datetime DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`invoice_id` int(11) DEFAULT NULL,
`quote_id` int(11) DEFAULT NULL,
@ -528,7 +528,7 @@ CREATE TABLE `networks` (
`network_notes` text DEFAULT NULL,
`network_created_at` datetime NOT NULL,
`network_updated_at` datetime DEFAULT NULL,
`network_deleted_at` datetime DEFAULT NULL,
`network_archived_at` datetime DEFAULT NULL,
`location_id` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -551,7 +551,7 @@ CREATE TABLE `payments` (
`payment_reference` varchar(200) DEFAULT NULL,
`payment_created_at` datetime NOT NULL,
`payment_updated_at` datetime DEFAULT NULL,
`payment_deleted_at` datetime DEFAULT NULL,
`payment_archived_at` datetime DEFAULT NULL,
`account_id` int(11) NOT NULL,
`invoice_id` int(11) DEFAULT NULL,
`company_id` int(11) NOT NULL,
@ -592,7 +592,7 @@ CREATE TABLE `products` (
`product_cost` decimal(15,2) NOT NULL,
`product_created_at` datetime NOT NULL,
`product_updated_at` datetime DEFAULT NULL,
`product_deleted_at` datetime DEFAULT NULL,
`product_archived_at` datetime DEFAULT NULL,
`tax_id` int(11) DEFAULT NULL,
`category_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -618,7 +618,7 @@ CREATE TABLE `quotes` (
`quote_url_key` varchar(200) DEFAULT NULL,
`quote_created_at` datetime NOT NULL,
`quote_updated_at` datetime DEFAULT NULL,
`quote_deleted_at` datetime DEFAULT NULL,
`quote_archived_at` datetime DEFAULT NULL,
`category_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -641,7 +641,7 @@ CREATE TABLE `records` (
`record_priority` int(11) DEFAULT NULL,
`record_created_at` datetime NOT NULL,
`record_updated_at` datetime NOT NULL,
`record_deleted_at` datetime DEFAULT NULL,
`record_archived_at` datetime DEFAULT NULL,
`domain_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`record_id`)
@ -666,7 +666,7 @@ CREATE TABLE `recurring` (
`recurring_note` text DEFAULT NULL,
`recurring_created_at` datetime NOT NULL,
`recurring_updated_at` datetime DEFAULT NULL,
`recurring_deleted_at` datetime DEFAULT NULL,
`recurring_archived_at` datetime DEFAULT NULL,
`category_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -690,7 +690,7 @@ CREATE TABLE `revenues` (
`revenue_description` varchar(200) DEFAULT NULL,
`revenue_created_at` datetime NOT NULL,
`revenue_updated_at` datetime DEFAULT NULL,
`revenue_deleted_at` datetime DEFAULT NULL,
`revenue_archived_at` datetime DEFAULT NULL,
`category_id` int(11) NOT NULL,
`account_id` int(11) NOT NULL,
`client_id` int(11) DEFAULT NULL,
@ -764,7 +764,7 @@ CREATE TABLE `software` (
`software_notes` text DEFAULT NULL,
`software_created_at` datetime NOT NULL,
`software_updated_at` datetime DEFAULT NULL,
`software_deleted_at` datetime DEFAULT NULL,
`software_archived_at` datetime DEFAULT NULL,
`login_id` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -785,7 +785,7 @@ CREATE TABLE `taxes` (
`tax_percent` float NOT NULL,
`tax_created_at` datetime NOT NULL,
`tax_updated_at` datetime DEFAULT NULL,
`tax_deleted_at` datetime DEFAULT NULL,
`tax_archived_at` datetime DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`tax_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -803,7 +803,7 @@ CREATE TABLE `ticket_updates` (
`ticket_update` text NOT NULL,
`ticket_update_created_at` datetime NOT NULL,
`ticket_update_updated_at` datetime DEFAULT NULL,
`ticket_update_deleted_at` datetime DEFAULT NULL,
`ticket_update_archived_at` datetime DEFAULT NULL,
`user_id` int(11) NOT NULL,
`ticket_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -829,7 +829,7 @@ CREATE TABLE `tickets` (
`ticket_status` varchar(200) NOT NULL,
`ticket_created_at` datetime NOT NULL,
`ticket_updated_at` datetime DEFAULT NULL,
`ticket_deleted_at` datetime DEFAULT NULL,
`ticket_archived_at` datetime DEFAULT NULL,
`ticket_closed_at` datetime DEFAULT NULL,
`ticket_created_by` int(11) NOT NULL,
`ticket_closed_by` int(11) DEFAULT NULL,
@ -852,7 +852,7 @@ CREATE TABLE `transfers` (
`transfer_notes` text DEFAULT NULL,
`transfer_created_at` datetime NOT NULL,
`transfer_updated_at` datetime DEFAULT NULL,
`transfer_deleted_at` datetime DEFAULT NULL,
`transfer_archived_at` datetime DEFAULT NULL,
`expense_id` int(11) NOT NULL,
`revenue_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
@ -879,7 +879,7 @@ CREATE TABLE `trips` (
`round_trip` int(1) NOT NULL,
`trip_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`trip_updated_at` datetime DEFAULT NULL,
`trip_deleted_at` datetime DEFAULT NULL,
`trip_archived_at` datetime DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`trip_id`)
@ -918,7 +918,7 @@ CREATE TABLE `users` (
`avatar` varchar(200) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`archived_at` datetime DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -949,7 +949,7 @@ CREATE TABLE `vendors` (
`vendor_global` tinyint(1) DEFAULT NULL,
`vendor_created_at` datetime NOT NULL,
`vendor_updated_at` datetime DEFAULT NULL,
`vendor_deleted_at` datetime DEFAULT NULL,
`vendor_archived_at` datetime DEFAULT NULL,
`client_id` int(11) NOT NULL,
`company_id` int(11) NOT NULL,
PRIMARY KEY (`vendor_id`)
@ -965,4 +965,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-02-06 15:37:20
-- Dump completed on 2021-02-06 16:02:57