CREATE TABLE `fbr_digital` (
  `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `is_enabled` TINYINT(1) DEFAULT 0,
  `api_url` VARCHAR(255) DEFAULT NULL,
  `token` TEXT DEFAULT NULL,
  `mode` ENUM('sandbox', 'production') DEFAULT 'sandbox',
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

UPDATE `setting_categories` SET `name` = 'FBR Integration' WHERE `setting_categories`.`id` = 2;

INSERT INTO `setting_categories` (`id`, `name`, `code`) VALUES (NULL, 'FBR Digital Integration', 'fbr_digital_integration');

UPDATE `setting_categories` SET `name` = 'FBR Integration' WHERE `setting_categories`.`id` = 2;


ALTER TABLE `branch_info` ADD COLUMN `province` VARCHAR(100) DEFAULT 'Punjab';

ALTER TABLE `customers`
    ADD COLUMN `ntn` VARCHAR(20) DEFAULT NULL,
    ADD COLUMN `province` VARCHAR(100) DEFAULT 'Punjab';


ALTER TABLE customers
ADD COLUMN active TINYINT(1) NOT NULL DEFAULT 1,
ADD COLUMN category_id INT DEFAULT NULL;

CREATE TABLE customer_categories (
    id INT AUTO_INCREMENT PRIMARY KEY,
    category_name VARCHAR(100) NOT NULL UNIQUE,
    description TEXT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

