
CREATE TABLE `tbl_all_push_notification_list` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `action_details` text DEFAULT NULL,
  `notification_sent_to` varchar(255) NOT NULL,
  `sent_to_count` int(11) DEFAULT NULL,
  `sent_on` datetime DEFAULT NULL,
  `sent_by` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `tbl_all_push_notification_list`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sent_by` (`sent_by`);

ALTER TABLE `tbl_all_push_notification_list`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `tbl_all_push_notification_list`
  ADD CONSTRAINT `tbl_all_push_notification_list_ibfk_1` FOREIGN KEY (`sent_by`) REFERENCES `tblapp_admin` (`id`) ON UPDATE CASCADE;
COMMIT;

INSERT INTO `tblapad_options` (`type`, `name`, `value`, `autoload`) VALUES
('notification_file', 'allowed_file_size', '5120', 1),
('notification_file', 'allowed_file_extention', '{\"image\":[\"jpeg\",\"jpg\",\"png\",\"gif\"],\"video\":[\"mp4\",\"mpeg\",\"webp\", \"avi\"],\"audio\":[],\"document\":[\"pdf\",\"doc\",\"docx\"]}', 1);
COMMIT;
