CREATE TABLE IF NOT EXISTS `#__djc2_orders_recurring` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `start` datetime NOT NULL,
  `executed` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;

ALTER TABLE `#__djc2_payment_methods` ADD `recurring` TINYINT NOT NULL DEFAULT '0' AFTER `postcodes`; 

ALTER TABLE `#__djc2_orders` ADD `recurring` TINYINT NOT NULL DEFAULT '0' AFTER `id`;
ALTER TABLE `#__djc2_orders` ADD `recurring_params` MEDIUMTEXT NULL AFTER `recurring`; 
ALTER TABLE `#__djc2_orders` ADD `delivery_shipping_days` INT NOT NULL DEFAULT '1' AFTER `delivery_method_id`;
ALTER TABLE `#__djc2_order_items` ADD `shipping_day` INT NOT NULL DEFAULT '1' AFTER `item_name`;