--
-- Table structure for table `#__vikrestaurants_admin_notes`
--

CREATE TABLE IF NOT EXISTS `#__vikrestaurants_admin_notes` (
  `id` int(4) unsigned NOT NULL AUTO_INCREMENT,
  `content` varchar(2048) DEFAULT NULL,
  `status` tinyint(1) DEFAULT 0 COMMENT '0: private, 1: public, 2: archived',
  `created` datetime DEFAULT NULL,
  `created_by` int(10) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  `modified_by` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci AUTO_INCREMENT=1;

--
-- Table structure for table `#__vikrestaurants_cronjob`
--

CREATE TABLE IF NOT EXISTS `#__vikrestaurants_cronjob` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(128) NOT NULL,
  `class` varchar(128) NOT NULL,
  `published` tinyint(1) DEFAULT 0,
  `params` text DEFAULT NULL,
  `createdon` datetime DEFAULT NULL,
  `resume_notif` datetime DEFAULT NULL COMMENT 'the date when the notifications will be resumed',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

--
-- Table structure for table `#__vikrestaurants_cronjob_log`
--

CREATE TABLE IF NOT EXISTS `#__vikrestaurants_cronjob_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `content` text NOT NULL,
  `metadata` blob DEFAULT NULL,
  `status` tinyint(1) DEFAULT 1,
  `mailed` tinyint(1) DEFAULT 0,
  `createdon` datetime DEFAULT NULL,
  `id_cronjob` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

--
-- Table structure for table `#__vikrestaurants_res_prod_assoc`
--

ALTER TABLE `#__vikrestaurants_res_prod_assoc`
ADD COLUMN `created` datetime DEFAULT NULL,
ADD COLUMN `modified` datetime DEFAULT NULL;

--
-- Table structure for table `#__vikrestaurants_takeaway_res_prod_assoc`
--

ALTER TABLE `#__vikrestaurants_takeaway_res_prod_assoc`
ADD COLUMN `created` datetime DEFAULT NULL,
ADD COLUMN `modified` datetime DEFAULT NULL;

--
-- Table structure for table `#__vikrestaurants_room_closure`
--

ALTER TABLE `#__vikrestaurants_room_closure`
ADD COLUMN `description` varchar(1024) DEFAULT NULL AFTER `id_room`,
ADD COLUMN `repeat` varchar(16) DEFAULT NULL,
ADD COLUMN `stop` int(11) DEFAULT 0;

--
-- Dumping data for table `#__vikrestaurants_config`
--

INSERT INTO `#__vikrestaurants_config`
(          `param`, `setting`) VALUES
(   'canclosebill',         1),
(   'tkservicetax',        ''),
('cron_secure_key',        ''),
(  'cron_log_mode',         1),
( 'cron_log_flush',        30);
