DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
                          `id` int NOT NULL AUTO_INCREMENT,
                          `name` varchar(200) NOT NULL,
                          `model` varchar(50) NOT NULL,
                          `presenter` varchar(75) NOT NULL,
                          `action` varchar(100) NOT NULL,
                          `user_id` int NOT NULL,
                          `customer_id` int NOT NULL,
                          `page_id` int DEFAULT NULL,
                          `insert_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
                          `event_pages_id` int DEFAULT NULL,
                          `title` varchar(250) DEFAULT NULL,
                          PRIMARY KEY (`id`),
                          KEY `events_event_pages_id_fk` (`event_pages_id`),
                          CONSTRAINT `events_event_pages_id_fk` FOREIGN KEY (`event_pages_id`) REFERENCES `event_pages` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3;