CREATE TABLE `wax_admin_setting` (
  `admin_setting_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) unsigned NOT NULL,
  `admin_mode` tinyint(1) NOT NULL DEFAULT 1,
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`admin_setting_id`),
  KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB;

CREATE TRIGGER `wax_admin_setting_insert_timestamp` BEFORE INSERT ON `wax_admin_setting` FOR EACH ROW SET NEW.insert_timestamp = NOW();

INSERT INTO wax_admin_setting (user_id, admin_mode)
VALUES (1, 1)
, (37, 1)
, (10550, 1);
