/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Author:  Akshay Tambekar
 * Created: Jul 10, 2020
 */

/**
* 15-05-2021
**/
ALTER TABLE `tbl_users` CHANGE `is_deleted` `is_deleted` TINYINT(1) NOT NULL COMMENT '0 = Not Deleted, 1 = Deleted';

ALTER TABLE `tbl_users` ADD `distributor_code` VARCHAR(100) NULL COMMENT 'This will only applicable for distributor user type' AFTER `city_id`;

/**
* 29-05-2021
**/
ALTER TABLE `tbl_products` ADD CONSTRAINT `fk_products_product_type_id` FOREIGN KEY (`product_type_id`) REFERENCES `tbl_product_types`(`product_type_id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

/**
* 11-06-2021
**/
INSERT INTO `tbl_product_types` (`product_type_id`, `product_type_name`, `updated_by`, `updated_at`, `created_by`, `created_at`) VALUES (6, 'Sensing Gateway', '1', current_timestamp(), '1', current_timestamp());