DB Structure Update This is the beginnings to move primary_contact and primary_location fields out of the clients table and into their respectable table. Created the fields in contacts and locations, next is to write SQL query to migrate and then update pieces of the codes in the App

This commit is contained in:
johnnyq
2023-07-03 16:40:45 -04:00
parent 66ec189fae
commit b12e3677bd
3 changed files with 14 additions and 5 deletions

4
db.sql
View File

@@ -357,6 +357,7 @@ CREATE TABLE `contacts` (
`contact_password_hash` varchar(200) DEFAULT NULL,
`contact_password_reset_token` varchar(200) DEFAULT NULL,
`contact_token_expire` datetime DEFAULT NULL,
`contact_primary` tinyint(1) NOT NULL DEFAULT 0,
`contact_important` tinyint(1) NOT NULL DEFAULT 0,
`contact_billing` tinyint(1) DEFAULT 0,
`contact_technical` tinyint(1) DEFAULT 0,
@@ -682,6 +683,7 @@ CREATE TABLE `locations` (
`location_phone` varchar(200) DEFAULT NULL,
`location_hours` varchar(200) DEFAULT NULL,
`location_photo` varchar(200) DEFAULT NULL,
`location_primary` tinyint(1) NOT NULL DEFAULT 0,
`location_notes` text DEFAULT NULL,
`location_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`location_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
@@ -1616,4 +1618,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-06-20 19:53:31
-- Dump completed on 2023-07-03 16:38:34