/* Disable Foreign Keys */
pragma foreign_keys = off;
/* Begin Transaction */
begin transaction;

/* Database [database_default] */
pragma auto_vacuum=0;
pragma encoding='UTF-8';
pragma page_size=1024;

DELETE FROM [main].[setting] WHERE id = 6; -- Display Type
DELETE FROM [main].[setting] WHERE id = 26; -- Classic DMD
DELETE FROM [main].[setting] WHERE id = 27; -- Color DMD
DELETE FROM [main].[setting] WHERE id = 28; -- Color DMD Dots Color Preset
DELETE FROM [main].[setting] WHERE id = 30; -- Color DMD Dots Color Red
DELETE FROM [main].[setting] WHERE id = 31; -- Color DMD Dots Color Green
DELETE FROM [main].[setting] WHERE id = 32; -- Color DMD Dots Color Blue
DELETE FROM [main].[setting] WHERE id = 37; -- Color DMD Background Color Preset
DELETE FROM [main].[setting] WHERE id = 38; -- Color DMD Background Color Red
DELETE FROM [main].[setting] WHERE id = 39; -- Color DMD Background Color Green
DELETE FROM [main].[setting] WHERE id = 40; -- Color DMD Background Color Blue
DELETE FROM [main].[setting] WHERE id = 52; -- DMD update interval

insert into [main].[setting] values(88, 'Live DMD framerate', null, '0,2,4,8,16,32;off,16 fps,8 fps,4 fps,2 fps,1 fps', null, null, null, '2', '2');

UPDATE [main].[setting] SET [format] = 'score' WHERE [id] = 81; -- Alternative E.B. Award

/* BetaBrite */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 17 AND [value] = 'off';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 17 AND [value] = 'on';
UPDATE [main].[setting] SET [default] = 0, [options] = '0,1;not installed,installed' WHERE [id] = 17;

/* Euro score format */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 19 AND [value] = 'no';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 19 AND [value] = 'yes';
UPDATE [main].[setting] SET [default] = 0, [options] = '1,0;yes,no' WHERE [id] = 19;

/* Live enabled */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 23 AND [value] = 'no';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 23 AND [value] = 'yes';
UPDATE [main].[setting] SET [default] = 0, [options] = '1,0;yes,no' WHERE [id] = 23;

/* Restart after crash */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 45 AND [value] = 'no';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 45 AND [value] = 'yes';
UPDATE [main].[setting] SET [default] = 1, [options] = '1,0;yes,no' WHERE [id] = 45;

/* EB mode lanes can unlite */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 46 AND [value] = 'no';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 46 AND [value] = 'yes';
UPDATE [main].[setting] SET [default] = 0, [options] = '1,0;yes,no' WHERE [id] = 46;

/* Videomode enabled */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 49 AND [value] = 'no';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 49 AND [value] = 'yes';
UPDATE [main].[setting] SET [default] = 1, [options] = '1,0;yes,no' WHERE [id] = 49;

/* Flipper Switch Mod */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 51 AND [value] = 'not installed';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 51 AND [value] = 'installed';
UPDATE [main].[setting] SET [default] = 0, [options] = '0,1;not installed,installed' WHERE [id] = 51;

/* Tournament Mode */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 78 AND [value] = 'off';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 78 AND [value] = 'on';
UPDATE [main].[setting] SET [default] = 0, [options] = '1,0;yes,no' WHERE [id] = 78;

/* Free play */
UPDATE [main].[setting] SET [value] = 0 WHERE [id] = 83 AND [value] = 'no';
UPDATE [main].[setting] SET [value] = 1 WHERE [id] = 83 AND [value] = 'yes';
UPDATE [main].[setting] SET [default] = 1, [options] = '1,0;yes,no' WHERE [id] = 83;


/* Drop table [main].[menuitem] */
drop table if exists [main].[menuitem];

/* Table structure [main].[menuitem] */
CREATE TABLE [main].[menuitem] (
  [id] INTEGER NOT NULL PRIMARY KEY,
  [title] VARCHAR NOT NULL,
  [type] VARCHAR,
  [data] VARCHAR,
  [order] INTEGER,
  [level] INTEGER);

/* Data [main].[menuitem] */
insert into [main].[menuitem] values(1, 'Main menu', '', '', 0, 0);
insert into [main].[menuitem] values(2, 'Test Menu', '', '', 1, 1);
insert into [main].[menuitem] values(3, 'Switch Test', 'MenuItem_Test_Switch', '', 2, 2);
insert into [main].[menuitem] values(4, 'Coil Test', '', '', 3, 2);
insert into [main].[menuitem] values(5, 'Ball Release', 'MenuItem_Test_Solenoid', 'ballRelease', 4, 3);
insert into [main].[menuitem] values(6, 'Lock Post', 'MenuItem_Test_Solenoid', 'lockPost', 5, 3);
insert into [main].[menuitem] values(7, 'Outhole', 'MenuItem_Test_Solenoid', 'outhole', 6, 3);
insert into [main].[menuitem] values(8, 'Scoop', 'MenuItem_Test_Solenoid', 'scoop', 7, 3);
insert into [main].[menuitem] values(9, 'Skillshot Kicker', 'MenuItem_Test_Solenoid', 'skillshotKicker', 8, 3);
insert into [main].[menuitem] values(10, 'Mini Playfield Gate', 'MenuItem_Test_Solenoid', 'miniGate', 9, 3);
insert into [main].[menuitem] values(11, 'Head Mouth', 'MenuItem_Test_Solenoid', 'headMouth', 10, 3);
insert into [main].[menuitem] values(12, 'Head Left Eye', 'MenuItem_Test_Solenoid', 'headLeftEye', 11, 3);
insert into [main].[menuitem] values(13, 'Head Right Eye', 'MenuItem_Test_Solenoid', 'headRightEye', 12, 3);
insert into [main].[menuitem] values(14, 'Jet Left', 'MenuItem_Test_Solenoid', 'jetL', 13, 3);
insert into [main].[menuitem] values(15, 'Jet Right', 'MenuItem_Test_Solenoid', 'jetR', 14, 3);
insert into [main].[menuitem] values(16, 'Jet Bottom', 'MenuItem_Test_Solenoid', 'jetB', 15, 3);
insert into [main].[menuitem] values(17, 'Jets Slingshot', 'MenuItem_Test_Solenoid', 'jetsSling', 16, 3);
insert into [main].[menuitem] values(18, 'Slingshot Left', 'MenuItem_Test_Solenoid', 'slingL', 17, 3);
insert into [main].[menuitem] values(19, 'Slingshot Right', 'MenuItem_Test_Solenoid', 'slingR', 18, 3);
insert into [main].[menuitem] values(20, 'Knocker', 'MenuItem_Test_Solenoid', 'knocker', 19, 3);
insert into [main].[menuitem] values(21, 'Adjustment Menu', '', '', 20, 1);
insert into [main].[menuitem] values(22, 'Rules', '', '', 21, 2);
insert into [main].[menuitem] values(23, 'Balls per game', 'MenuItem_Setting', '1', 22, 3);
insert into [main].[menuitem] values(24, 'Tournament Mode', 'MenuItem_Setting', '78', 23, 3);
insert into [main].[menuitem] values(25, 'Extra Balls', '', '', 24, 3);
insert into [main].[menuitem] values(26, 'Max E.B. Total', 'MenuItem_Setting', '79', 25, 4);
insert into [main].[menuitem] values(27, 'Max E.B. Per Ball', 'MenuItem_Setting', '80', 26, 4);
insert into [main].[menuitem] values(28, 'Alternative Award', 'MenuItem_Setting', '81', 27, 4);
insert into [main].[menuitem] values(29, 'Ball saver', '', '', 28, 3);
insert into [main].[menuitem] values(30, 'First ball saver', 'MenuItem_Setting', '4', 29, 4);
insert into [main].[menuitem] values(31, 'Later ball savers', 'MenuItem_Setting', '20', 30, 4);
insert into [main].[menuitem] values(32, 'Tilt', '', '', 31, 3);
insert into [main].[menuitem] values(33, 'Tilt warnings', 'MenuItem_Setting', '2', 32, 4);
insert into [main].[menuitem] values(34, 'Tilt warning gap', 'MenuItem_Setting', '3', 33, 4);
insert into [main].[menuitem] values(35, 'Multiball', '', '', 34, 3);
insert into [main].[menuitem] values(36, 'MB1 Jackpots required', 'MenuItem_Setting', '41', 35, 4);
insert into [main].[menuitem] values(37, 'Power Charge time', 'MenuItem_Setting', '8', 36, 4);
insert into [main].[menuitem] values(38, 'Heart rate drop time', 'MenuItem_Setting', '42', 37, 4);
insert into [main].[menuitem] values(39, 'Videomode', '', '', 38, 3);
insert into [main].[menuitem] values(40, 'Videomode enabled', 'MenuItem_Setting', '49', 39, 4);
insert into [main].[menuitem] values(41, 'PIN*BOT letters pre-lit', 'MenuItem_Setting', '50', 40, 4);
insert into [main].[menuitem] values(42, 'Wheel', '', '', 41, 3);
insert into [main].[menuitem] values(43, 'Small wheel', '', '', 42, 4);
insert into [main].[menuitem] values(44, '50K mode time', 'MenuItem_Setting', '11', 43, 5);
insert into [main].[menuitem] values(45, '100K mode time', 'MenuItem_Setting', '12', 44, 5);
insert into [main].[menuitem] values(46, '250K mode time', 'MenuItem_Setting', '13', 45, 5);
insert into [main].[menuitem] values(47, 'EB mode', '', '', 46, 5);
insert into [main].[menuitem] values(48, 'EB mode time', 'MenuItem_Setting', '14', 47, 6);
insert into [main].[menuitem] values(49, 'Lanes can unlite', 'MenuItem_Setting', '46', 48, 6);
insert into [main].[menuitem] values(50, 'Lite EB mode time', 'MenuItem_Setting', '15', 49, 5);
insert into [main].[menuitem] values(51, 'Lite JP mode time', 'MenuItem_Setting', '16', 50, 5);
insert into [main].[menuitem] values(52, 'Big wheel', '', '', 51, 4);
insert into [main].[menuitem] values(53, 'Billion mode', '', '', 52, 5);
insert into [main].[menuitem] values(54, 'Billion mode time', 'MenuItem_Setting', '70', 53, 6);
insert into [main].[menuitem] values(55, 'Time added per shot', 'MenuItem_Setting', '76', 54, 6);
insert into [main].[menuitem] values(56, 'Ball saver time', 'MenuItem_Setting', '77', 55, 6);
insert into [main].[menuitem] values(57, '10M mode time', 'MenuItem_Setting', '71', 56, 5);
insert into [main].[menuitem] values(58, '50M mode time', 'MenuItem_Setting', '72', 57, 5);
insert into [main].[menuitem] values(59, 'Special mode time', 'MenuItem_Setting', '73', 58, 5);
insert into [main].[menuitem] values(60, '5M mode time', 'MenuItem_Setting', '74', 59, 5);
insert into [main].[menuitem] values(61, '1M mode time', 'MenuItem_Setting', '75', 60, 5);
insert into [main].[menuitem] values(62, 'JP incr. per mode', 'MenuItem_Setting', '10', 61, 4);
insert into [main].[menuitem] values(63, 'Values doubled time', 'MenuItem_Setting', '9', 62, 4);
insert into [main].[menuitem] values(64, 'Pricing', '', '', 63, 2);
insert into [main].[menuitem] values(65, 'Free play', 'MenuItem_Setting', '83', 64, 3);
insert into [main].[menuitem] values(66, 'Reset credits', 'MenuItem_ResetCredits', '', 65, 3);
insert into [main].[menuitem] values(67, 'Coin Slots Units', '', '', 66, 3);
insert into [main].[menuitem] values(68, 'Left Coin Units', 'MenuItem_Setting', '84', 67, 4);
insert into [main].[menuitem] values(69, 'Center Coin Units', 'MenuItem_Setting', '85', 68, 4);
insert into [main].[menuitem] values(70, 'Right Coin Units', 'MenuItem_Setting', '86', 69, 4);
insert into [main].[menuitem] values(71, '4th Coin Units', 'MenuItem_Setting', '87', 70, 4);
insert into [main].[menuitem] values(72, 'Head position', 'MenuItem_Setting', '7', 71, 2);
insert into [main].[menuitem] values(73, 'Coil Strengths', '', '', 72, 2);
insert into [main].[menuitem] values(74, 'Ball Release', 'MenuItem_Setting', '53', 73, 3);
insert into [main].[menuitem] values(75, 'Lock Post', 'MenuItem_Setting', '25', 74, 3);
insert into [main].[menuitem] values(76, 'Outhole', 'MenuItem_Setting', '54', 75, 3);
insert into [main].[menuitem] values(77, 'Scoop', 'MenuItem_Setting', '55', 76, 3);
insert into [main].[menuitem] values(78, 'Skillshot Kicker', 'MenuItem_Setting', '56', 77, 3);
insert into [main].[menuitem] values(79, 'Head Mouth', 'MenuItem_Setting', '57', 78, 3);
insert into [main].[menuitem] values(80, 'Head Left Eye', 'MenuItem_Setting', '58', 79, 3);
insert into [main].[menuitem] values(81, 'Head Right Eye', 'MenuItem_Setting', '59', 80, 3);
insert into [main].[menuitem] values(82, 'Jet Left', 'MenuItem_Setting', '60', 81, 3);
insert into [main].[menuitem] values(83, 'Jet Right', 'MenuItem_Setting', '61', 82, 3);
insert into [main].[menuitem] values(84, 'Jet Bottom', 'MenuItem_Setting', '62', 83, 3);
insert into [main].[menuitem] values(85, 'Jets Slingshot', 'MenuItem_Setting', '63', 84, 3);
insert into [main].[menuitem] values(86, 'Slingshot Left', 'MenuItem_Setting', '64', 85, 3);
insert into [main].[menuitem] values(87, 'Slingshot Right', 'MenuItem_Setting', '65', 86, 3);
insert into [main].[menuitem] values(88, 'Knocker', 'MenuItem_Setting', '66', 87, 3);
insert into [main].[menuitem] values(89, 'Sound', '', '', 88, 2);
insert into [main].[menuitem] values(90, 'Master volume', 'MenuItem_Volume', '5', 89, 3);
insert into [main].[menuitem] values(91, 'Music volume', 'MenuItem_Volume', '67', 90, 3);
insert into [main].[menuitem] values(92, 'SFX volume', 'MenuItem_Volume', '68', 91, 3);
insert into [main].[menuitem] values(93, 'Voice volume', 'MenuItem_Volume', '69', 92, 3);
insert into [main].[menuitem] values(94, 'Display', '', '', 93, 2);
insert into [main].[menuitem] values(95, 'Dots shape', 'MenuItem_Setting', '29', 94, 3);
insert into [main].[menuitem] values(96, 'Scale', 'MenuItem_Setting', '33', 95, 3);
insert into [main].[menuitem] values(97, 'Vertical position', 'MenuItem_Setting', '35', 96, 3);
insert into [main].[menuitem] values(98, 'Horizontal position', 'MenuItem_Setting', '36', 97, 3);
insert into [main].[menuitem] values(99, 'Window border', 'MenuItem_Setting', '34', 98, 3);
insert into [main].[menuitem] values(100, 'Live', '', '', 99, 2);
insert into [main].[menuitem] values(101, 'Live enabled', 'MenuItem_Setting', '23', 100, 3);
insert into [main].[menuitem] values(102, 'Live DMD framerate', 'MenuItem_Setting', '88', 101, 3);
insert into [main].[menuitem] values(103, 'Localization', '', '', 102, 2);
insert into [main].[menuitem] values(104, 'Euro score format', 'MenuItem_Setting', '19', 103, 3);
insert into [main].[menuitem] values(105, 'Peripherals', '', '', 104, 2);
insert into [main].[menuitem] values(106, 'Betabrite', '', '', 105, 3);
insert into [main].[menuitem] values(107, 'BetaBrite', 'MenuItem_Setting', '17', 106, 4);
insert into [main].[menuitem] values(108, 'BetaBrite COM Port', 'MenuItem_Setting', '18', 107, 4);
insert into [main].[menuitem] values(109, 'Flipper Switch Mod', 'MenuItem_Setting', '51', 108, 3);
insert into [main].[menuitem] values(110, 'Player Profiles', 'MenuItem_PlayerProfiles', '', 109, 1);
insert into [main].[menuitem] values(111, 'Software Menu', '', '', 110, 1);
insert into [main].[menuitem] values(112, 'Current version', 'MenuItem_Setting', '0', 111, 2);
insert into [main].[menuitem] values(113, 'Exit current game', 'MenuItem_ExitGame', '', 112, 3);
insert into [main].[menuitem] values(114, 'Exit to launcher', 'MenuItem_ExitToLauncher', '', 113, 3);
insert into [main].[menuitem] values(115, 'Restart', 'MenuItem_RestartSoftware', '', 114, 3);
insert into [main].[menuitem] values(116, 'Version select', 'MenuItem_VersionSelect', '', 115, 2);
insert into [main].[menuitem] values(117, 'USB update', 'MenuItem_USBUpdate', '', 116, 2);
insert into [main].[menuitem] values(118, 'Internet update', 'MenuItem_InternetUpdate', '', 117, 2);
insert into [main].[menuitem] values(119, 'Pinmame ROM', 'MenuItem_Setting', '48', 118, 2);


/* Commit Transaction */
commit transaction;

/* Enable Foreign Keys */
pragma foreign_keys = on;
