ALTER TABLE `menuitems` ADD `salestax` INT NOT NULL DEFAULT '1' AFTER `displaypriority`;

ALTER TABLE `orderitems` ADD `salestax` INT NOT NULL DEFAULT '1' AFTER `multiplier`;


CREATE TABLE `booleanddl` (
  `id` int(11) NOT NULL,
  `valueid` int(11) NOT NULL,
  `valuename` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


INSERT INTO `booleanddl` (`id`, `valueid`, `valuename`) VALUES
(1, 0, 'No'),
(2, 1, 'Yes');


ALTER TABLE `booleanddl`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `booleanddl`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;COMMIT;

INSERT INTO `tabledefs` (`defid`, `tablename`, `settingname`, `actualfield`, `datatype`, `fielddescription`, `isid`, `showintable`, `editable`, `ordinality`, `sqlquery`, `relationshiptable`, `displaysql`, `defaultvalue`) VALUES (NULL, 'menuitems', 'Apply Sales Tax?', 'salestax', 'dropdown', 'Does Sales Tax Apply to this menu item?', '0', '0', '1', '50', 'select valueid as id, valuename as val from booleanddl order by valueid asc', '', '', '');


ALTER TABLE `menuitems` ADD `delaygroup` INT NOT NULL DEFAULT '-1' AFTER `salestax`;

ALTER TABLE `modifiers` ADD `delaygroup` INT NOT NULL DEFAULT '-1' AFTER `displayorder`;


INSERT INTO `tabledefs` (`defid`, `tablename`, `settingname`, `actualfield`, `datatype`, `fielddescription`, `isid`, `showintable`, `editable`, `ordinality`, `sqlquery`, `relationshiptable`, `displaysql`, `defaultvalue`) VALUES (NULL, 'menuitems', 'Delay Group', 'delaygroup', 'dropdownoptional', 'Do not send this order to kitchen until all items are bumped from this display first.', '0', '0', '1', '55', 'select displayid as id, displayname as val from displays order by displayname asc', '', '', '');

INSERT INTO `tabledefs` (`defid`, `tablename`, `settingname`, `actualfield`, `datatype`, `fielddescription`, `isid`, `showintable`, `editable`, `ordinality`, `sqlquery`, `relationshiptable`, `displaysql`, `defaultvalue`) VALUES (NULL, 'modifiers', 'Delay Group', 'delaygroup', 'dropdownoptional', 'Do not send this order to kitchen until all items are bumped from this display first.', '0', '0', '1', '55', 'select displayid as id, displayname as val from displays order by displayname asc', '', '', '');

ALTER TABLE `orderitems` ADD `delaygroup` INT NOT NULL DEFAULT '-1' AFTER `salestax`;

ALTER TABLE `displayorders` ADD `delaygroup` INT NOT NULL DEFAULT '-1' AFTER `priority`, ADD `ishidden` INT NOT NULL DEFAULT '0' AFTER `delaygroup`;