private static void UpdateTo_0_3_0(ref Boolean foundError) { try { String sqlString; Program.SplashScreen.InfoAdd("...updating structure of database to v0.3.0..."); Program.SplashScreen.InfoAdd("...please be patient, this can take a few minutes depending on your system and data..."); Program.SplashScreen.InfoAdd("..."); // add changes to the database sqlString = "-- MySQL Workbench Synchronization \n" + "-- Generated: 2016-05-09 12:39 \n" + "-- Model: New Model \n" + "-- Version: 1.0 \n" + "-- Project: Name of the project \n" + "-- Author: Duke \n" + " \n" + "SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; \n" + "SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; \n" + "SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Commodity` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Armour` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Weapon` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_MissileType` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_WeaponMount` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_WeaponClass` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_WeaponRating` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_OldVariant` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_CounterMeasure` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Utility` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Rating` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_RatingPlanet` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Standard` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Internal` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Internal_Misc` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Category` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbDNMap_Ships` ( \n" + "`CompanionName` VARCHAR(255) NOT NULL, \n" + "`CompanionAddition` VARCHAR(255) NOT NULL, \n" + "`GameName` VARCHAR(255) NOT NULL, \n" + "`GameAddition` VARCHAR(255) NOT NULL, \n" + "PRIMARY KEY (`CompanionName`, `CompanionAddition`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + " \n" + "SET SQL_MODE=@OLD_SQL_MODE; \n" + "SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; \n" + "SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Commodity` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Agricultural Medicines', '', 'Agri-Medicines', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Ai Relics', '', 'AI Relics', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Atmospheric Extractors', '', 'Atmospheric Processors', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Auto Fabricators', '', 'Auto-Fabricators', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Basic Narcotics', '', 'Narcotics', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Bio Reducing Lichen', '', 'Bioreducing Lichen', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Comercial Samples', '', 'Commercial Samples', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Drones', '', 'Limpet', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Encripted Data Storage', '', 'Encrypted Data Storage', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Hafnium178', '', 'Hafnium 178', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Hazardous Environment Suits', '', 'H.E. Suits', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Heliostatic Furnaces', '', 'Microbial Furnaces', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Marine Supplies', '', 'Marine Equipment', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Meta Alloys', '', 'Meta-Alloys', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Mu Tom Imager', '', 'Muon Imager', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Non Lethal Weapons', '', 'Non-Lethal Weapons', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('S A P8 Core Container', '', 'SAP 8 Core Container', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Skimer Components', '', 'Skimmer Components', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Terrain Enrichment Systems', '', 'Land Enrichment Systems', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Trinkets Of Fortune', '', 'Trinkets Of Hidden Fortune', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Unknown Artifact', '', 'Unknown Artefact', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Ancient Artefact', '', 'Ancient Artefact', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Experimental Chemicals', '', 'Experimental Chemicals', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Military Plans', '', 'Military Plans', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Prototype Tech', '', 'Prototype Tech', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Rebel Transmissions', '', 'Rebel Transmissions', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Technical Blueprints', '', 'Technical Blueprints', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('U S S Cargo Trade Data', '', 'Trade Data', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Commodity` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Wreckage Components', '', 'Salvageable Wreckage', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Armour` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Armour` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('grade1', '', 'Lightweight Alloy', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Armour` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('grade2', '', 'Reinforced Alloy', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Armour` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('grade3', '', 'Military Grade Composite', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Armour` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('mirrored', '', 'Mirrored Surface Composite', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Armour` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('reactive', '', 'Reactive Surface Composite', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Weapon` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('advancedtorppylon', '', 'Torpedo Pylon', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('basicmissilerack', '', 'Missile Rack', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('beamlaser', '', 'Beam Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('beamlaser', 'heat', 'Retributor Beam Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cannon', '', 'Cannon', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('drunkmissilerack', '', 'Pack-Hound Missile Rack', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('dumbfiremissilerack', '', 'Missile Rack', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('minelauncher', '', 'Mine Launcher', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('minelauncher', 'impulse', 'Shock Mine Launcher', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('mininglaser', '', 'Mining Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('mininglaser', 'advanced', 'Mining Lance Beam Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('multicannon', '', 'Multi-Cannon', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('multicannon', 'strong', 'Enforcer Cannon', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('plasmaaccelerator', '', 'Plasma Accelerator', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('plasmaaccelerator', 'advanced', 'Advanced Plasma Accelerator', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('pulselaser', '', 'Pulse Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('pulselaser', 'disruptor', 'Pulse Disruptor Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('pulselaserburst', '', 'Burst Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('pulselaserburst', 'scatter', 'Cytoscrambler Burst Laser', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('railgun', '', 'Rail Gun', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('railgun', 'burst', 'Imperial Hammer Rail Gun', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('slugshot', '', 'Fragment Cannon', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Weapon` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('slugshot', 'range', 'Pacifier Frag-Cannon', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_MissileType` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_MissileType` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('advancedtorppylon', '', 'Seeker', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_MissileType` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('basicmissilerack', '', 'Seeker', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_MissileType` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('drunkmissilerack', '', 'Swarm', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_MissileType` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('dumbfiremissilerack', '', 'Dumbfire', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_WeaponMount` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponMount` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('fixed', '', 'Fixed', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponMount` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('gimbal', '', 'Gimballed', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponMount` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('turret', '', 'Turreted', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_WeaponClass` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponClass` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('tiny', '', '0', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponClass` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('small', '', '1', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponClass` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('medium', '', '2', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponClass` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('large', '', '3', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponClass` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('huge', '', '4', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_WeaponRating` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_advancedtorppylon_fixed_small', '', 'I', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_advancedtorppylon_fixed_medium', '', 'I', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_basicmissilerack_fixed_small', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_basicmissilerack_fixed_medium', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_fixed_small', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_fixed_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_fixed_large', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_gimbal_small', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_gimbal_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_gimbal_large', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_turret_small', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_turret_medium', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_beamlaser_turret_large', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_fixed_small', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_fixed_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_fixed_large', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_fixed_huge', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_gimbal_small', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_gimbal_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_gimbal_large', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_gimbal_huge', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_turret_small', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_turret_medium', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_cannon_turret_large', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_drunkmissilerack_fixed_medium', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_dumbfiremissilerack_fixed_small', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_dumbfiremissilerack_fixed_medium', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_minelauncher_fixed_small', '', 'I', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_minelauncher_fixed_medium', '', 'I', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_mininglaser_fixed_small', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_mininglaser_fixed_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_multicannon_fixed_small', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_multicannon_fixed_medium', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_multicannon_gimbal_small', '', 'G', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_multicannon_gimbal_medium', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_multicannon_turret_small', '', 'G', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_multicannon_turret_medium', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_plasmaaccelerator_fixed_medium', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_plasmaaccelerator_fixed_large', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_plasmaaccelerator_fixed_huge', '', 'A', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_fixed_small', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_fixed_medium', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_fixed_large', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_gimbal_small', '', 'G', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_gimbal_medium', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_gimbal_large', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_turret_small', '', 'G', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_turret_medium', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaser_turret_large', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_fixed_small', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_fixed_medium', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_fixed_large', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_gimbal_small', '', 'G', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_gimbal_medium', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_gimbal_large', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_turret_small', '', 'G', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_turret_medium', '', 'F', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_pulselaserburst_turret_large', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_railgun_fixed_small', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_railgun_fixed_medium', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_fixed_small', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_fixed_medium', '', 'A', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_fixed_large', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_gimbal_small', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_gimbal_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_gimbal_large', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_turret_small', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_turret_medium', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_WeaponRating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hpt_slugshot_turret_large', '', 'C', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_OldVariant` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_OldVariant` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('f', '', 'Focussed', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_OldVariant` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hi', '', 'High Impact', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_OldVariant` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('lh', '', 'Low Heat', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_OldVariant` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('oc', '', 'Overcharged', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_OldVariant` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('ss', '', 'Scatter Spray', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_CounterMeasure` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_CounterMeasure` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('chafflauncher', '', 'Chaff Launcher', 'I'); \n" + "INSERT INTO `elite_db`.`tbDNMap_CounterMeasure` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('electroniccountermeasure', '', 'Electronic Countermeasure', 'F'); \n" + "INSERT INTO `elite_db`.`tbDNMap_CounterMeasure` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('heatsinklauncher', '', 'Heat Sink Launcher', 'I'); \n" + "INSERT INTO `elite_db`.`tbDNMap_CounterMeasure` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('plasmapointdefence', '', 'Point Defence', 'I'); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Utility` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Utility` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cargoscanner', '', 'Cargo Scanner', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Utility` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cloudscanner', '', 'Frame Shift Wake Scanner', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Utility` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('crimescanner', '', 'Kill Warrant Scanner', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Utility` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('shieldbooster', '', 'Shield Booster', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Rating` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Rating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('1', '', 'E', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Rating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('2', '', 'D', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Rating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('3', '', 'C', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Rating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('4', '', 'B', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Rating` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('5', '', 'A', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_RatingPlanet` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_RatingPlanet` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('1', '', 'H', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_RatingPlanet` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('2', '', 'G', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Standard` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('engine', '', 'Thrusters', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('fueltank', '', 'Fuel Tank', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hyperdrive', '', 'Frame Shift Drive', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('lifesupport', '', 'Life Support', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('powerdistributor', '', 'Power Distributor', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('powerplant', '', 'Power Plant', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Standard` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('sensors', '', 'Sensors', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Internal` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('buggybay', '', 'Planetary Vehicle Hangar', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cargorack', '', 'Cargo Rack', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('collection', '', 'Collector Limpet Controller', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('fsdinterdictor', '', 'Frame Shift Drive Interdictor', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('fuelscoop', '', 'Fuel Scoop', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('fueltransfer', '', 'Fuel Transfer Limpet Controller', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hullreinforcement', '', 'Hull Reinforcement Package', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('prospector', '', 'Prospector Limpet Controller', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('refinery', '', 'Refinery', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('repairer', '', 'Auto Field-Maintenance Unit', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('resourcesiphon', '', 'Hatch Breaker Limpet Controller', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('shieldcellbank', '', 'Shield Cell Bank', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('shieldgenerator', '', 'Shield Generator', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('shieldgenerator', 'fast', 'Bi-Weave Shield Generator', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('shieldgenerator', 'strong', 'Prismatic Shield Generator', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Internal_Misc` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal_Misc` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('detailedsurfacescanner', 'tiny', 'Detailed Surface Scanner', 'C'); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal_Misc` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('dockingcomputer', 'standard', 'Standard Docking Computer', 'E'); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal_Misc` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('stellarbodydiscoveryscanner', 'standard', 'Basic Discovery Scanner', 'E'); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal_Misc` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('stellarbodydiscoveryscanner', 'intermediate', 'Intermediate Discovery Scanner', 'D'); \n" + "INSERT INTO `elite_db`.`tbDNMap_Internal_Misc` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('stellarbodydiscoveryscanner', 'advanced', 'Advanced Discovery Scanner', 'C'); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Category` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Category` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Narcotics', '', 'Legal Drugs', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Category` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Slaves', '', 'Slavery', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Category` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('Waste', '', 'Waste', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Category` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('NonMarketable', '', '', ''); \n" + " \n" + "COMMIT; \n" + " \n" + " \n" + "-- ----------------------------------------------------- \n" + "-- Data for table `elite_db`.`tbDNMap_Ships` \n" + "-- ----------------------------------------------------- \n" + "START TRANSACTION; \n" + "USE `elite_db`; \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('adder', '', 'Adder', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('anaconda', '', 'Anaconda', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('asp', '', 'Asp Explorer', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('asp_scout', '', 'Asp Scout', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cobramkiii', '', 'Cobra MkIII', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cobramkiv', '', 'Cobra MkIV', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('cutter', '', 'Imperial Cutter', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('diamondback', '', 'Diamondback Scout', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('diamondbackxl', '', 'Diamondback Explorer', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('eagle', '', 'Eagle', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('empire_courier', '', 'Imperial Courier', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('empire_eagle', '', 'Imperial Eagle', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('empire_fighter', '', 'Imperial Fighter', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('empire_trader', '', 'Imperial Clipper', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('federation_corvette', '', 'Federal Corvette', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('federation_dropship', '', 'Federal Dropship', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('federation_dropship_mkii', '', 'Federal Assault Ship', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('federation_gunship', '', 'Federal Gunship', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('federation_fighter', '', 'F63 Condor', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('ferdelance', '', 'Fer-de-Lance', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('hauler', '', 'Hauler', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('independant_trader', '', 'Keelback', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('orca', '', 'Orca', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('python', '', 'Python', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('sidewinder', '', 'Sidewinder', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('type6', '', 'Type-6 Transporter', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('type7', '', 'Type-7 Transporter', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('type9', '', 'Type-9 Heavy', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('viper', '', 'Viper MkIII', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('viper_mkiv', '', 'Viper MkIV', ''); \n" + "INSERT INTO `elite_db`.`tbDNMap_Ships` (`CompanionName`, `CompanionAddition`, `GameName`, `GameAddition`) VALUES ('vulture', '', 'Vulture', ''); \n" + " \n" + "COMMIT; \n" + " \n"; var sqlScript = new MySql.Data.MySqlClient.MySqlScript((MySql.Data.MySqlClient.MySqlConnection)Program.DBCon.Connection); sqlScript.Query = sqlString; sqlScript.Error += sqlScript_Error; sqlScript.ScriptCompleted += sqlScript_ScriptCompleted; sqlScript.StatementExecuted += sqlScript_StatementExecuted; m_MREvent = new ManualResetEvent(false); sqlScript.ExecuteAsync(); sqlScript.Error -= sqlScript_Error; sqlScript.ScriptCompleted -= sqlScript_ScriptCompleted; sqlScript.StatementExecuted -= sqlScript_StatementExecuted; if (!m_MREvent.WaitOne(new TimeSpan(0, 5, 0))) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else if (m_gotScriptErrors) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else { Program.SplashScreen.InfoAdd("...updating structure of database to v0.3.0...<OK>"); } } catch (Exception ex) { throw new Exception("Error while updating to v0.3.0", ex); } }
private static void UpdateTo_0_2_3(ref Boolean foundError) { String sqlString; Program.SplashScreen.InfoAdd("...updating structure of database to v0.2.3..."); Program.SplashScreen.InfoAdd("...please be patient, this can take a few minutes depending on your system and data..."); // insert settings for new columns EliteDBIO.InsertColumnDefinition(IBE.MTPriceAnalysis.tabPriceAnalysis.DB_GROUPNAME, "Station1_ColumnSettings", 0, 0, "False/NotSet/40/100/5"); EliteDBIO.InsertColumnDefinition(IBE.MTPriceAnalysis.tabPriceAnalysis.DB_GROUPNAME, "Station2_ColumnSettings", 0, 0, "False/NotSet/40/100/5"); Program.SplashScreen.InfoAdd("..."); // add changes to the database sqlString = "-- MySQL Workbench Synchronization \n" + "-- Generated: 2016-04-26 14:30 \n" + "-- Model: New Model \n" + "-- Version: 1.0 \n" + "-- Project: Name of the project \n" + "-- Author: Duke \n" + " \n" + "SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; \n" + "SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; \n" + "SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; \n" + " \n" + "ALTER TABLE `elite_db`.`tmPA_S2S_StationData` \n" + "ADD COLUMN `Station_ID` INT(11) NULL DEFAULT NULL FIRST; \n" + " \n" + "SET SQL_MODE=@OLD_SQL_MODE; \n" + "SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; \n" + "SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; \n"; var sqlScript = new MySql.Data.MySqlClient.MySqlScript((MySql.Data.MySqlClient.MySqlConnection)Program.DBCon.Connection); sqlScript.Query = sqlString; sqlScript.Error += sqlScript_Error; sqlScript.ScriptCompleted += sqlScript_ScriptCompleted; sqlScript.StatementExecuted += sqlScript_StatementExecuted; m_MREvent = new ManualResetEvent(false); sqlScript.ExecuteAsync(); sqlScript.Error -= sqlScript_Error; sqlScript.ScriptCompleted -= sqlScript_ScriptCompleted; sqlScript.StatementExecuted -= sqlScript_StatementExecuted; if (!m_MREvent.WaitOne(new TimeSpan(0, 5, 0))) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else if (m_gotScriptErrors) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else Program.SplashScreen.InfoAdd("...updating structure of database to v0.2.3...<OK>"); // forcing once SetGridDefaults(true); }
private static void UpdateTo_0_5_3(ref Boolean foundError) { try { String sqlString; Program.SplashScreen.InfoAdd("...updating structure of database to v0.5.3..."); Program.SplashScreen.InfoAdd("...please be patient, this can take a few minutes depending on your system and data..."); Program.SplashScreen.InfoAdd("..."); // add changes to the database sqlString = "INSERT IGNORE INTO `elite_db`.`tbEventType` (`id`, `eventtype`) VALUES (17, 'Scan'); \n" + " \n" + " \n" + " \n"; var sqlScript = new MySql.Data.MySqlClient.MySqlScript((MySql.Data.MySqlClient.MySqlConnection)Program.DBCon.Connection); sqlScript.Query = sqlString; sqlScript.Error += sqlScript_Error; sqlScript.ScriptCompleted += sqlScript_ScriptCompleted; sqlScript.StatementExecuted += sqlScript_StatementExecuted; m_MREvent = new ManualResetEvent(false); sqlScript.ExecuteAsync(); sqlScript.Error -= sqlScript_Error; sqlScript.ScriptCompleted -= sqlScript_ScriptCompleted; sqlScript.StatementExecuted -= sqlScript_StatementExecuted; if (!m_MREvent.WaitOne(new TimeSpan(0, 5, 3))) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else if (m_gotScriptErrors) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else { Program.SplashScreen.InfoAdd("...updating structure of database to v0.5.3...<OK>"); } } catch (Exception ex) { throw new Exception("Error while updating to v0.5.3", ex); } }
private static void UpdateTo_0_2_0(ref Boolean foundError) { String sqlString; Program.SplashScreen.InfoAdd("...updating structure of database to v0.2.0..."); Program.SplashScreen.InfoAdd("...please be patient, this can take a few minutes depending on your system and data..."); Program.SplashScreen.InfoAdd("..."); // add changes to the database sqlString = "-- MySQL Workbench Synchronization \n" + "-- Generated: 2016-03-25 20:24 \n" + "-- Model: New Model \n" + "-- Version: 1.0 \n" + "-- Project: Name of the project \n" + "-- Author: Duke \n" + " \n" + "SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; \n" + "SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; \n" + "SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; \n" + " \n" + " \n" + "ALTER TABLE `elite_db`.`tbCommodityData` \n" + "DROP PRIMARY KEY, \n" + "ADD PRIMARY KEY (`id`), \n" + "CHANGE COLUMN `id` `id` BIGINT(20) NOT NULL AUTO_INCREMENT; \n" + " \n" + "ALTER TABLE `elite_db`.`tbPriceHistory` \n" + "DROP FOREIGN KEY `fk_tbPriceHistory_tbSources1`; \n" + " \n" + "ALTER TABLE `elite_db`.`tbPriceHistory` \n" + "DROP INDEX `fk_tbPriceHistory_tbSources1_idx`; \n" + " \n" + "ALTER TABLE `elite_db`.`tbPriceHistory` \n" + "DROP COLUMN `Source_id`, \n" + "CHANGE COLUMN `id` `id` BIGINT(20) NOT NULL AUTO_INCREMENT , \n" + "CHANGE COLUMN `timestamp` `timestamp` DATETIME NOT NULL , \n" + "ADD COLUMN `Sources_id` INT(11) NOT NULL AFTER `SupplyLevel`; \n" + " \n" + "ALTER TABLE `elite_db`.`tbPriceHistory` \n" + "ADD INDEX `fk_tbPriceHistory_tbSources1_idx` (`Sources_id` ASC); \n" + " \n" + "ALTER TABLE `elite_db`.`tbPriceHistory` ADD CONSTRAINT `fk_tbPriceHistory_tbSources1` \n" + " FOREIGN KEY (`Sources_id`) \n" + " REFERENCES `elite_db`.`tbSource` (`id`) \n" + " ON DELETE NO ACTION \n" + " ON UPDATE NO ACTION; \n" + " \n" + "INSERT INTO `Elite_DB`.`tbInitValue` (`InitGroup`, `InitKey`, `InitValue`) VALUES ('Database', 'CollectPriceHistory', 'True'); \n" + " \n" + "DELIMITER $$ \n" + " \n" + "USE `elite_db`$$ \n" + "CREATE DEFINER = CURRENT_USER TRIGGER `elite_db`.`tbCommodityData_AFTER_INSERT` AFTER INSERT ON `tbCommodityData` FOR EACH ROW \n" + "BEGIN \n" + " DECLARE isActive BOOLEAN; \n" + " \n" + " SELECT ((InitValue <> '0') and (InitValue <> 'False')) INTO isActive \n" + " FROM tbInitValue \n" + " WHERE InitGroup = 'Database' \n" + " AND InitKey = 'CollectPriceHistory'; \n" + " \n" + " IF isActive THEN \n" + " INSERT INTO `elite_db`.`tbPriceHistory` \n" + " (`station_id`, `commodity_id`, `Sell`, `Buy`, `Demand`, `DemandLevel`, `Supply`, `SupplyLevel`, `Sources_id`, `timestamp`) \n" + " VALUES \n" + " (NEW.`station_id`, NEW.`commodity_id`, NEW.`Sell`, NEW.`Buy`, NEW.`Demand`, NEW.`DemandLevel`, NEW.`Supply`, NEW.`SupplyLevel`, NEW.`Sources_id`, NEW.`timestamp`); \n" + " END IF; \n" + "END$$ \n" + " \n" + "USE `elite_db`$$ \n" + "CREATE DEFINER = CURRENT_USER TRIGGER `elite_db`.`tbCommodityData_AFTER_UPDATE` AFTER UPDATE ON `tbCommodityData` FOR EACH ROW \n" + "BEGIN \n" + " DECLARE isActive BOOLEAN; \n" + " \n" + " SELECT ((InitValue <> '0') and (InitValue <> 'False')) INTO isActive \n" + " FROM tbInitValue \n" + " WHERE InitGroup = 'Database' \n" + " AND InitKey = 'CollectPriceHistory'; \n" + " \n" + " IF isActive THEN \n" + " IF (NEW.Sell <> OLD.Sell) OR (NEW.Buy <> OLD.Buy) OR (NEW.Sources_id <> OLD.Sources_id) OR \n" + " (TIMESTAMPDIFF(hour, OLD.timestamp, NEW.timestamp) > 24) THEN \n" + " INSERT INTO `elite_db`.`tbPriceHistory` \n" + " (`station_id`, `commodity_id`, `Sell`, `Buy`, `Demand`, `DemandLevel`, `Supply`, `SupplyLevel`, `Sources_id`, `timestamp`) \n" + " VALUES \n" + " (NEW.`station_id`, NEW.`commodity_id`, NEW.`Sell`, NEW.`Buy`, NEW.`Demand`, NEW.`DemandLevel`, NEW.`Supply`, NEW.`SupplyLevel`, NEW.`Sources_id`, NEW.`timestamp`);\n" + " END IF; \n" + " END IF; \n" + "END$$ \n" + " \n" + " \n" + "DELIMITER ; \n" + " \n" + "-- shift id-values to right, because we need 0 as undefined data \n" + "update tbSource set source = 'IBE' where id = 1; \n" + "update tbSource set source = 'EDDN' where id = 2; \n" + "insert into tbSource(id, source) values (3, 'FILE'); \n" + " \n" + "update tbCommodityData set Sources_id = 1; \n" + "update tbPriceHistory set Sources_id = 1; \n" + "delete from tbSource where id = 0; \n" + " \n" + "INSERT ignore INTO `Elite_DB`.`tbPriceHistory` \n" + " (`station_id`, `commodity_id`, `Sell`, `Buy`, `Demand`, `DemandLevel`, `Supply`, `SupplyLevel`, `Sources_id`, `timestamp`) \n" + " select `station_id`, `commodity_id`, `Sell`, `Buy`, `Demand`, `DemandLevel`, `Supply`, `SupplyLevel`, `Sources_id`, `timestamp` from tbcommoditydata; \n" + " \n" + "ALTER TABLE `elite_db`.`tmPA_S2S_StationData` \n" + "ADD COLUMN `Sources_id` INT(11) NULL DEFAULT NULL AFTER `Profit`; \n" + " \n" + "ALTER TABLE `elite_db`.`tmPA_ByCommodity` \n" + "ADD COLUMN `Sources_id` INT(11) NULL DEFAULT NULL AFTER `Timestamp`; \n" + " \n" + "ALTER TABLE `elite_db`.`tmPA_S2S_BestTrips` \n" + "ADD COLUMN `DistanceToRoute` DOUBLE NULL DEFAULT NULL AFTER `DistanceToStar_2`; \n" + " \n" + "ALTER TABLE `elite_db`.`tmPA_ByStation` \n" + "CHANGE COLUMN `Source` `Sources_id` INT(11) NULL DEFAULT NULL ; \n" + " \n" + "ALTER TABLE `elite_db`.`tmPA_AllCommodities` \n" + "ADD COLUMN `Buy_Sources_id` INT(11) NULL DEFAULT NULL AFTER `Buy_Timestamp`, \n" + "ADD COLUMN `Sell_Sources_id` INT(11) NULL DEFAULT NULL AFTER `Sell_Timestamp`; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbTrustedSenders` ( \n" + " `Name` VARCHAR(255) NOT NULL, \n" + " PRIMARY KEY (`Name`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "INSERT INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('E:D Market Connector [Windows]'); \n" + "INSERT INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('EDAPI Trade Dangerous Plugin'); \n" + "INSERT INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('E:D Market Connector [Mac OS]'); \n" + "INSERT INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('ED-IBE (API)'); \n" + " \n" + "SET SQL_MODE=@OLD_SQL_MODE; \n" + "SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; \n" + "SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; \n"; var sqlScript = new MySql.Data.MySqlClient.MySqlScript((MySql.Data.MySqlClient.MySqlConnection)Program.DBCon.Connection); sqlScript.Query = sqlString; sqlScript.Error += sqlScript_Error; sqlScript.ScriptCompleted += sqlScript_ScriptCompleted; sqlScript.StatementExecuted += sqlScript_StatementExecuted; m_MREvent = new ManualResetEvent(false); sqlScript.ExecuteAsync(); sqlScript.Error -= sqlScript_Error; sqlScript.ScriptCompleted -= sqlScript_ScriptCompleted; sqlScript.StatementExecuted -= sqlScript_StatementExecuted; if (!m_MREvent.WaitOne(new TimeSpan(0, 5, 0))) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else if (m_gotScriptErrors) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else Program.SplashScreen.InfoAdd("...updating structure of database to v0.2.0...<OK>"); }
private static void UpdateTo_0_4_0(ref Boolean foundError) { try { String sqlString; Program.SplashScreen.InfoAdd("...updating structure of database to v0.4.0..."); Program.SplashScreen.InfoAdd("...please be patient, this can take a few minutes depending on your system and data..."); Program.SplashScreen.InfoAdd("..."); // add changes to the database sqlString = "-- MySQL Workbench Synchronization \n" + "-- Generated: 2016-10-05 21:13 \n" + " \n" + "ALTER TABLE `elite_db`.`tbInitValue` \n" + "CHANGE COLUMN `InitValue` `InitValue` VARCHAR(10000) NULL DEFAULT NULL ; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbOutfittingBase` ( \n" + " `id` INT(11) NOT NULL, \n" + " `symbol` VARCHAR(80) NOT NULL, \n" + " `category` VARCHAR(80) NOT NULL, \n" + " `name` VARCHAR(80) NOT NULL, \n" + " `mount` VARCHAR(80) NULL DEFAULT NULL, \n" + " `guidance` VARCHAR(80) NULL DEFAULT NULL, \n" + " `ship` VARCHAR(80) NULL DEFAULT NULL, \n" + " `class` CHAR(1) NOT NULL, \n" + " `rating` CHAR(1) NOT NULL, \n" + " `entitlement` VARCHAR(80) NULL DEFAULT NULL, \n" + " PRIMARY KEY (`id`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbCommodityBase` ( \n" + " `id` INT(11) NOT NULL, \n" + " `category` VARCHAR(80) NULL DEFAULT NULL, \n" + " `name` VARCHAR(80) NULL DEFAULT NULL, \n" + " `average` INT(11) NULL DEFAULT NULL, \n" + " PRIMARY KEY (`id`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "CREATE TABLE IF NOT EXISTS `elite_db`.`tbShipyardBase` ( \n" + " `id` INT(11) NOT NULL, \n" + " `symbol` VARCHAR(80) NOT NULL, \n" + " `name` VARCHAR(80) NULL DEFAULT NULL, \n" + " PRIMARY KEY (`id`)) \n" + "ENGINE = InnoDB \n" + "DEFAULT CHARACTER SET = utf8; \n" + " \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_weaponrating` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_weaponmount` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_weaponclass` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_weapon` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_utility` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_standard` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_ships` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_ratingplanet` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_rating` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_oldvariant` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_missiletype` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_internal_misc` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_internal` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_countermeasure` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_category` ; \n" + "DROP TABLE IF EXISTS `elite_db`.`tbdnmap_armour` ; \n" + " \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('E:D Market Connector [Windows]'); \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('EDAPI Trade Dangerous Plugin'); \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('E:D Market Connector [Mac OS]'); \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('ED-IBE (API)'); \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('EVA [iPad]'); \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('EVA [iPhone]'); \n" + "INSERT IGNORE INTO `elite_db`.`tbTrustedSenders` (`Name`) VALUES ('EVA [Android]'); \n"; var sqlScript = new MySql.Data.MySqlClient.MySqlScript((MySql.Data.MySqlClient.MySqlConnection)Program.DBCon.Connection); sqlScript.Query = sqlString; sqlScript.Error += sqlScript_Error; sqlScript.ScriptCompleted += sqlScript_ScriptCompleted; sqlScript.StatementExecuted += sqlScript_StatementExecuted; m_MREvent = new ManualResetEvent(false); sqlScript.ExecuteAsync(); sqlScript.Error -= sqlScript_Error; sqlScript.ScriptCompleted -= sqlScript_ScriptCompleted; sqlScript.StatementExecuted -= sqlScript_StatementExecuted; if (!m_MREvent.WaitOne(new TimeSpan(0, 5, 0))) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else if (m_gotScriptErrors) { foundError = true; Program.SplashScreen.InfoAppendLast("finished with errors !"); } else { Program.SplashScreen.InfoAdd("...updating structure of database to v0.4.0...<OK>"); } } catch (Exception ex) { throw new Exception("Error while updating to v0.4.0", ex); } }