CREATE TABLE `password_resets` (                                                          
                   `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,                                  
                   `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,                                  
                   `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,  
                   `updated_at` timestamp NULL DEFAULT NULL,                                               
                   KEY `password_resets_email_index` (`email`),                                            
                   KEY `password_resets_token_index` (`token`)                                             
                 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci                              


-- CHANGES BY ARSALAN 22-04-2019
CREATE TABLE `password_resets` (                                               
                   `id` int(255) NOT NULL AUTO_INCREMENT,                                       
                   `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,                   
                   `token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,                   
                   `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,                       
                   `updated_at` timestamp NULL DEFAULT NULL,                                    
                   PRIMARY KEY (`id`),                                                          
                   KEY `password_resets_email_index` (`email`),                                 
                   KEY `password_resets_token_index` (`token`)                                  
                 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci  

CREATE TABLE `push_notifications` (                       
                      `id` int(11) NOT NULL AUTO_INCREMENT,                   
                      `roles` varchar(11) DEFAULT NULL,                       
                      `message` tinytext,                                     
                      `created_at` datetime DEFAULT NULL,                     
                      `updated_at` datetime DEFAULT NULL,                     
                      PRIMARY KEY (`id`)                                      
                    ) ENGINE=MyISAM AUTO_INCREMENT=65 DEFAULT CHARSET=latin1  

alter table `tamimilaravelnew`.`essam_videos` add column `date` date NULL after `id`


// Drop table site_configuration

CREATE TABLE `site_configuration` (                      
  `id` int(11) NOT NULL AUTO_INCREMENT,                  
  `meta_key` varchar(255) DEFAULT NULL,                  
  `meta_value` varchar(255) DEFAULT NULL,                
  `created_at` datetime DEFAULT NULL,                    
  `updated_at` datetime DEFAULT NULL,                    
  PRIMARY KEY (`id`)                                     
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=latin1 


CREATE TABLE `user_devices` (                                            
                `id` int(11) NOT NULL AUTO_INCREMENT,                                  
                `user_id` int(11) DEFAULT NULL,                                        
                `device_id` varchar(255) DEFAULT NULL,                                 
                `device_type` tinyint(1) DEFAULT NULL COMMENT '1 = IOS, 2 = Andriod',  
                `status` tinyint(1) DEFAULT NULL,                                      
                `created_at` timestamp NULL DEFAULT NULL,                              
                `updated_at` timestamp NULL DEFAULT NULL,                              
                PRIMARY KEY (`id`)                                                     
              ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1  


// not added to staging
CREATE TABLE `matter_users` (                            
                `id` int(11) NOT NULL AUTO_INCREMENT,                  
                `email` varchar(255) DEFAULT NULL,                     
                `matterNumber` varchar(255) DEFAULT NULL,              
                `created_at` timestamp NULL DEFAULT NULL,              
                `updated_at` timestamp NULL DEFAULT NULL,              
                PRIMARY KEY (`id`)                                     
              ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1      


CREATE TABLE `matter_trust_balances` (                    
                 `id` int(11) NOT NULL AUTO_INCREMENT,                   
                 `matterNumber` varchar(255) DEFAULT NULL,               
                 `currency` varchar(255) DEFAULT NULL,                   
                 `trBalance` varchar(255) DEFAULT NULL,                  
                 `created_at` timestamp NULL DEFAULT NULL,               
                 `updated_at` timestamp NULL DEFAULT NULL,               
                 PRIMARY KEY (`id`)                                      
               ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=latin1  
 


alter table `matters` drop column `trustBalance`,add column `clientMatterNumber` varchar(250) NULL after `matterNumber`, add column `clientName` varchar(250) NULL after `clientNumber`, add column `billingTKEmail` varchar(250) NULL after `billingTKName`,change `billingTKPR` `billingTKName` varchar(250) character set utf8 collate utf8_general_ci NULL 

alter table `matter_users` change `matter_id` `matterNumber` varchar(255) character set latin1 collate latin1_swedish_ci NULL

alter table `matter_trust_balances` change `matter_id` `matterNumber` int(11) NULL 

alter table `matter_trust_balances` change `matterNumber` `matterNumber` varchar(255) NULL 

CREATE TABLE `notification` (                 
                `id` int(11) NOT NULL AUTO_INCREMENT,       
                `type` varchar(100) DEFAULT NULL,           
                `heading` text,                             
                `text` text,                                
                `matter_number` varchar(100) DEFAULT NULL,  
                `date_time` datetime DEFAULT NULL,          
                `call_from` varchar(100) DEFAULT NULL,      
                `created_at` timestamp NULL DEFAULT NULL,   
                `updated_at` timestamp NULL DEFAULT NULL,   
                PRIMARY KEY (`id`)                          
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1       
-- CHANGES BY ARSALAN 30-04-2019

site_configuration_section  CREATE TABLE `site_configuration_section` (              
                              `id` int(11) NOT NULL AUTO_INCREMENT,                  
                              `section_name` varchar(255) DEFAULT NULL,              
                              `created_at` timestamp NULL DEFAULT NULL,              
                              `updated_at` timestamp NULL DEFAULT NULL,              
                              PRIMARY KEY (`id`)                                     
                            ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1  

                            alter table `tamimi_laravel`.`essam_videos` add column `title` varchar(255) NULL after `id`

-- CHANGES BY ARSALAN 15-05-2019


                            alter table `tamimi_laravel`.`form_enteries` add column `user_id` int(11) NULL after `id`