SEDB70 update scripts

For bug reports and fixes, installation issues, and new ideas for technical features.

Moderator: SEOW Developers

IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

SEDB70 update scripts

Post by IV/JG7_4Shades »

I have discontinued active support for MSAccess versions of SEDB. There have been no protests so far and this focus on MySQL will reduce development complexity. The MSAccess drivers are still available inside SEOW but will not be tested or maintained into the future.

Focusing on MySQL means that it is easy for us to issue SEDB patches because MySQL has a very convenient Data Definition Language (DDL). The MySQL DDL allows us to change the SEDB structure and content via simple SQL scripts.

I will post in this thread SEDB update scripts that people can apply to their databases as the DCS and MP versions are updated. There will be two different posts, one primarily for structure updates and one for data updates.

Cheers,
4Shades
IV/JG7_4Shades
SEOW Developer

Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

SEDB70 series structure updates. These will be posted in advance of the associated DCS and MP updates.

Code: Select all

#Required for DCS 7.0.2 and MP4public v7.0.2
ALTER TABLE Campaign_Settings ADD COLUMN Entrenchments INT;
UPDATE Campaign_Settings SET Entrenchments = 100;
IV/JG7_4Shades
SEOW Developer

Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

SEDB70 series data updates. These will be posted in advance of any associated DCS and MP updates.

Code: Select all

#Required for DCS v7.0.0 - missing Radar Controller Late
INSERT INTO `Object_Specifications` VALUES ('RadarControlChainHome_Late', '0', 'PBO', 0, 0, 0, 0, 54000, 0, 0, 0, 0, 0, 1, 0, 1, 'Human', 'air.RadarControlChainHome_Late', 'air.RadarControlChainHome_Late', 'vehicles.planes.Plane$B_29', 'vehicles.planes.Plane$B_29', 575000, 9012, 493, 575, 9100, 520, 26274, 0, 10241, 4, 10, 0, 0, 0, 1, 1, 'r', 'Radar Control Late', 'Radar Control Late', '19430901', 1, 1, NULL);
INSERT INTO `Object_Specifications_Steppe` VALUES ('RadarControlChainHome_Late', '0', 'PBO', 0, 0, 0, 0, 54000, 0, 0, 0, 0, 0, 1, 0, 1, 'Human', 'air.RadarControlChainHome_Late', 'air.RadarControlChainHome_Late', 'vehicles.planes.Plane$B_29', 'vehicles.planes.Plane$B_29', 575000, 9012, 493, 575, 9100, 520, 26274, 0, 10241, 4, 10, 0, 0, 0, 1, 1, 'r', 'Radar Control Late', 'Radar Control Late', '19430901', 1, 1, NULL);
INSERT INTO `Object_Specifications_Street` VALUES ('RadarControlChainHome_Late', '0', 'PBO', 0, 0, 0, 0, 54000, 0, 0, 0, 0, 0, 1, 0, 1, 'Human', 'air.RadarControlChainHome_Late', 'air.RadarControlChainHome_Late', 'vehicles.planes.Plane$B_29', 'vehicles.planes.Plane$B_29', 575000, 9012, 493, 575, 9100, 520, 26274, 0, 10241, 4, 10, 0, 0, 0, 1, 1, 'r', 'Radar Control Late', 'Radar Control Late', '19430901', 1, 1, NULL);
INSERT INTO `Object_Costs` VALUES ('RadarControlChainHome_Late',900);

Code: Select all

#Niobe With Beacon
UPDATE Object_Specifications SET Stationary='ships.Ship$NiobeWithBeacon', Inactive='ships.Ship$NiobeWithBeacon' WHERE Object_Type='NiobeWithBeacon';
UPDATE Object_Specifications_Steppe SET Stationary='ships.Ship$NiobeWithBeacon', Inactive='ships.Ship$NiobeWithBeacon' WHERE Object_Type='NiobeWithBeacon';
UPDATE Object_Specifications_Street SET Stationary='ships.Ship$NiobeWithBeacon', Inactive='ships.Ship$NiobeWithBeacon' WHERE Object_Type='NiobeWithBeacon';

Code: Select all

#Missing Spitfire MkXVI variants
INSERT INTO `Object_Specifications` VALUES ('SPITFIRE16E25', '0', 'PFI', '0', '0', '0', '0', '3000', '0', '0', '0', '0', '0', '1', '0', '4', 'Human', 'air.SPITFIRE16E25', 'air.SPITFIRE16E25', 'vehicles.planes.Plane$SPITFIRE16E25', 'vehicles.planes.Plane$SPITFIRE16E25', '670000', '700', '610', '760', '8400', '685', '500', '340', '13106', '1', '1', '0', '0', '0', '1', '1', 'r', 'Supermarine Spitfire MkXVIe (25lb)', 'Supermarine Spitfire MkXVIe (25lb)', '19441101', '1', '0', null);
INSERT INTO `Object_Specifications` VALUES ('SPITFIRE16ECLP25', '0', 'PFI', '0', '0', '0', '0', '3000', '0', '0', '0', '0', '0', '1', '0', '4', 'Human', 'air.SPITFIRE16ECLP25', 'air.SPITFIRE16ECLP25', 'vehicles.planes.Plane$SPITFIRE16ECLP25', 'vehicles.planes.Plane$SPITFIRE16ECLP25', '670000', '700', '610', '760', '8400', '685', '500', '340', '13106', '1', '1', '0', '0', '0', '1', '1', 'r', 'Supermarine Spitfire MkXVIe (25lb) (CW)', 'Supermarine Spitfire MkXVIe (25lb) (CW)', '19441101', '1', '0', null);
#Steppe
INSERT INTO `Object_Specifications_Steppe` VALUES ('SPITFIRE16E25', '0', 'PFI', '0', '0', '0', '0', '3000', '0', '0', '0', '0', '0', '1', '0', '4', 'Human', 'air.SPITFIRE16E25', 'air.SPITFIRE16E25', 'vehicles.planes.Plane$SPITFIRE16E25', 'vehicles.planes.Plane$SPITFIRE16E25', '670000', '700', '610', '760', '8400', '685', '500', '340', '13106', '1', '1', '0', '0', '0', '1', '1', 'r', 'Supermarine Spitfire MkXVIe (25lb)', 'Supermarine Spitfire MkXVIe (25lb)', '19441101', '1', '0', null);
INSERT INTO `Object_Specifications_Steppe` VALUES ('SPITFIRE16ECLP25', '0', 'PFI', '0', '0', '0', '0', '3000', '0', '0', '0', '0', '0', '1', '0', '4', 'Human', 'air.SPITFIRE16ECLP25', 'air.SPITFIRE16ECLP25', 'vehicles.planes.Plane$SPITFIRE16ECLP25', 'vehicles.planes.Plane$SPITFIRE16ECLP25', '670000', '700', '610', '760', '8400', '685', '500', '340', '13106', '1', '1', '0', '0', '0', '1', '1', 'r', 'Supermarine Spitfire MkXVIe (25lb) (CW)', 'Supermarine Spitfire MkXVIe (25lb) (CW)', '19441101', '1', '0', null);
#Street
INSERT INTO `Object_Specifications_Street` VALUES ('SPITFIRE16E25', '0', 'PFI', '0', '0', '0', '0', '3000', '0', '0', '0', '0', '0', '1', '0', '4', 'Human', 'air.SPITFIRE16E25', 'air.SPITFIRE16E25', 'vehicles.planes.Plane$SPITFIRE16E25', 'vehicles.planes.Plane$SPITFIRE16E25', '670000', '700', '610', '760', '8400', '685', '500', '340', '13106', '1', '1', '0', '0', '0', '1', '1', 'r', 'Supermarine Spitfire MkXVIe (25lb)', 'Supermarine Spitfire MkXVIe (25lb)', '19441101', '1', '0', null);
INSERT INTO `Object_Specifications_Street` VALUES ('SPITFIRE16ECLP25', '0', 'PFI', '0', '0', '0', '0', '3000', '0', '0', '0', '0', '0', '1', '0', '4', 'Human', 'air.SPITFIRE16ECLP25', 'air.SPITFIRE16ECLP25', 'vehicles.planes.Plane$SPITFIRE16ECLP25', 'vehicles.planes.Plane$SPITFIRE16ECLP25', '670000', '700', '610', '760', '8400', '685', '500', '340', '13106', '1', '1', '0', '0', '0', '1', '1', 'r', 'Supermarine Spitfire MkXVIe (25lb) (CW)', 'Supermarine Spitfire MkXVIe (25lb) (CW)', '19441101', '1', '0', null);
FW-190A2/3 Loadouts (updated 11 Feb 2014)

Code: Select all

DELETE FROM `AircraftLoadout` WHERE Obj_Long_Name='air.FW_190A2';
DELETE FROM `AircraftLoadout` WHERE Obj_Long_Name='air.FW_190A3';
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A2', 'u1', 'U1: 2 x MG17 + 2 x MG151/20 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A2', 'u3', 'U3: U1 + Droptank + Recce Photo Pod *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u1', 'U1: 2xMG 151/20 Only *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u11sc250', 'U1 + 1xSC 250 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u11ab250', 'U1 + 1xAB 250 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u3', 'U3: 2xMG 17 + 2xMG 151/20 Only *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u31sc250', 'U3 + 1xSC 250 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u31ab250', 'U3 + 1xAB 250 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u31sc500', 'U3 + 1xSC 500 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u31ab500', 'U3 + 1xAB 500 *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u31tank', 'U3 + 1xType D Droptank *', '100', '1', '0', '0');
INSERT INTO `AircraftLoadout` VALUES ('air.FW_190A3', 'u41tank', 'U3 + Droptank + Recce Photo Pod *', '100', '1', '0', '0');

AircraftLoadout additions (for MP v7.0.22, updated 15 March 2014)

Code: Select all

# Add default loadouts for all aircraft
INSERT INTO AircraftLoadout ( Obj_Long_Name, Load_out, Description, Max_Internal_Fuel, HSFX_Loadout, Rearm_Delay, Airbase_Supply_Req )
SELECT CONCAT('air.',Object_Specifications.Object_Type),'default','Default',100,0,0,0 FROM Object_Specifications WHERE LEFT(Object_Class,1)='P' ORDER BY Object_Type;

# Add empty loadouts for all aircraft
INSERT INTO AircraftLoadout ( Obj_Long_Name, Load_out, Description, Max_Internal_Fuel, HSFX_Loadout, Rearm_Delay, Airbase_Supply_Req )
SELECT CONCAT('air.',Object_Specifications.Object_Type),'none','Empty',100,0,0,0 FROM Object_Specifications WHERE LEFT(Object_Class,1)='P' ORDER BY Object_Type;
IV/JG7_4Shades
SEOW Developer

Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

bump, see last addition above.
IV/JG7_4Shades
SEOW Developer

Image
22GCT_Gross
Posts: 302
Joined: Fri 13 Apr 2007 1:13 pm
Location: Italy

Post by 22GCT_Gross »

Hi Shades,
about last addition (and MP update to v. 7.0.23 - in particular: MP-head.js) I got this error:

Code: Select all

Error Line: 402
Error Code: 0
Error Message: Costante String senza terminazione
Error Url: http://itaseow.servegame.com/SEOW/MP4public/Italy_Africa_Greece/italy_africa_greece_sector.php

Error Line: 499
Error Code: 0
Error Message: 'SchedMission' non è definito
Error Url: http://itaseow.servegame.com/SEOW/MP4public/Italy_Africa_Greece/italy_africa_greece_sector.php

Error Line: 34
Error Code: 0
Error Message: 'NSchedMissions' non è definito
Error Url: http://itaseow.servegame.com/SEOW/MP4public/Scripts/MP-Body.js

Error Line: 532
Error Code: 0
Error Message: 'TURequest' non è definito
Error Url: http://itaseow.servegame.com/SEOW/MP4public/Italy_Africa_Greece/italy_africa_greece_sector.php
I restored the old aircraftsloadout table and it works.
However I guess I'm missing something.
22GCT_Gross
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Gross,

The update from 7.0.22 to 7.0.23 did not involve MP-Head.js. I will d/l your database and inspect.

Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Fixed. This bug was curious.

Your new AircraftLoadouts table had the correct "none" and "Empty" data for all aircraft, but the "default" and "Default" data was incorrect.

The Load_out field had "default" values (correct) but the Description field had the MySQL directive Default instead of the string constant "Default". This caused the problem.

The simple conversion:

Code: Select all

UPDATE AircraftLoadout SET Description='Default' WHERE Load_out='default';
fixed the problem. Your Ploesti DB at ITA-SEOW should now be working fine.

Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
22GCT_Gross
Posts: 302
Joined: Fri 13 Apr 2007 1:13 pm
Location: Italy

Post by 22GCT_Gross »

Thank you much
Let you know the table now is missing of 4 records: Empty and Default for the FW_190A2 and FW_190A3
22GCT_Gross
PA-Dore
Posts: 469
Joined: Thu 01 Nov 2007 8:58 am
Location: Savoie-France
Contact:

Post by PA-Dore »

Diego, I guess you applied the Mike sql request (FW-190A2/3 Loadouts updated 11 Feb 2014) on your database? This request deletes all records for FWA2/3 and needed be apply before the last request (AircraftLoadout additions for MP v7.0.22, updated 15 March 2014).

All is correct in my own database. You can easily add records manually
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

The Fw-190 thing is my fault, sorry. The Fw-190 loadout fix had not been applied to Diego's table, so I applied it *after* fixing the other bug, and forgot to add the new records.

Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Re: SEDB70 update scripts

Post by IV/JG7_4Shades »

Dore has contributed support for the new Channel Circus map. This has meant that I have released revisions to MP and SEDB, plus m inor bug fix revision to DCS. The official release thread has been updated.

DB scripts for Channel Circus are available at the usual place.

Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Re: SEDB70 update scripts

Post by IV/JG7_4Shades »

In a revision of the army unit naming methods I have added a new table to the database, called Army_Structure. An SQL script to add this table to an SEDB database is available here. This new table contains naming conventions for major army organizational units for all supported nations. See http://seowhq.net/seowwiki-en/index.php ... Unit_Types for more information.

The Army_Structure table must be in place for MP v7.0.28 (and later) and DCS v7.0.10 (and later) to work properly.
IV/JG7_4Shades
SEOW Developer

Image
Riksen
Posts: 125
Joined: Thu 17 Jan 2013 2:35 am
Location: Florida, USA
Contact:

Re: SEDB70 update scripts

Post by Riksen »

Amazing Shades!

Thank u all for ur work. Now completely up to date here. Perfect!!!!
Image
Riksen
Posts: 125
Joined: Thu 17 Jan 2013 2:35 am
Location: Florida, USA
Contact:

Re: SEDB70 update scripts

Post by Riksen »

Another issue for me right now....

After the update of MP4Public I'm getting this message every time I try to choose a sector in any map ..

Image

I checked the lines in the file and here is what i found (Line 1752 to 1758):

if ($rsGOOB->EOF) {
$strGOOB="";
}
else {
$strGOOB = addslashes(php_getstring($rsGOOB));
}
$rsGOOB->Close();


The message disapears if i replace it with the first version of MP4Public 7 but it doesnt load the sector. Im running an old version of Wampserver (2.0) could that be it?
Image
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Re: SEDB70 update scripts

Post by IV/JG7_4Shades »

Sorry guys, I forgot that the Army_Units table needs a new field as well.

Code: Select all

#Required for DCS 7.0.10 and MP4public v7.0.28
ALTER TABLE Army_Units ADD COLUMN Organization_Level VARCHAR(256);
UPDATE Army_Units SET Organization_Level = "Division";
Cheers,
4S
IV/JG7_4Shades
SEOW Developer

Image
Post Reply