-- Migration to create tbl_concern table
-- Execute this SQL script to create the concerns table and populate it with data

CREATE TABLE IF NOT EXISTS `tbl_concern` (
    `concern_id` int(11) NOT NULL AUTO_INCREMENT,
    `concern_name` varchar(255) NOT NULL,
    `description` text DEFAULT NULL,
    `is_active` tinyint(1) DEFAULT 1,
    `created_date` timestamp DEFAULT CURRENT_TIMESTAMP,
    `updated_date` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`concern_id`),
    KEY `idx_concern_active` (`is_active`),
    KEY `idx_concern_name` (`concern_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Insert sample concern data
INSERT INTO `tbl_concern` (`concern_name`, `description`) VALUES
('Food Intake', 'Concerns related to pet eating habits, appetite changes, or food-related issues'),
('Water Consumption', 'Issues with drinking water, excessive thirst, or dehydration concerns'),
('Behavioral Changes', 'Changes in pet behavior, temperament, or social interactions'),
('Physical Activity', 'Activity level changes, exercise intolerance, or mobility issues'),
('Digestive Issues', 'Stomach problems, digestion difficulties, or gastrointestinal concerns'),
('Respiratory Problems', 'Breathing difficulties, coughing, or respiratory system issues'),
('Skin & Coat Issues', 'Skin conditions, coat problems, or dermatological concerns'),
('Sleep Patterns', 'Changes in sleeping habits, restlessness, or sleep-related issues')
ON DUPLICATE KEY UPDATE 
`updated_date` = CURRENT_TIMESTAMP;
