More cleaning
authorTamber <tamber@furryhelix.co.uk>
Sun, 3 Oct 2021 16:57:42 +0000 (17:57 +0100)
committerTamber <tamber@furryhelix.co.uk>
Sun, 3 Oct 2021 16:57:42 +0000 (17:57 +0100)
V2101/V2101-Version.sql~ [deleted file]
doc/DATABASE.md

diff --git a/V2101/V2101-Version.sql~ b/V2101/V2101-Version.sql~
deleted file mode 100644 (file)
index 30521f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-INSERT INTO `Version` (`Version`, `DateTimeOf`) VALUES ("V2101","05/10/21 00:00:00");
index 5f29089..e34ccc6 100644 (file)
@@ -297,3 +297,82 @@ This encodes:
 - Whether a separate designated secondary brake system is fitted
 - And what axles the parking brake operates on. Code 'F' here
   indicates a transmission brake is fitted.
+
+# DTA database update file format
+
+(coming soon(TM))
+
+# SQlite3 Schema
+CREATE TABLE Master
+ (
+        DTpNumber                     Text (14) NOT NULL,
+        DuplicateID                   Text (2),
+        MakeId                        INT,
+        TypeId                        Text (4),
+        BrakeRoutine                  Text (8),
+        PPPSelector                   INT NOT NULL,
+        SplitRoutine                  Text (8),
+        SecFrontAxleSteered           INT NOT NULL,
+        ServiceBrakeDestrib           INT,
+        SecBrakeDestrib               INT,
+        TransSecParkBrake             INT NOT NULL,
+        SecBrakeOnlyOnTrac            INT NOT NULL,
+        GVW_DesignWeight              INT,
+        GTW_DesignWeight              INT,
+        Axle1DesignWeight             INT,
+        Axle2DesignWeight             INT,
+        Axle3DesignWeight             INT,
+        Axle4DesignWeight             INT,
+        Axle5DesignWeight             INT,
+        ABSFitted                     INT NOT NULL,
+        ABSOption                     INT NOT NULL,
+        SecParkBrakeOnDiffAxle        INT NOT NULL,
+        FoundServBrake                INT,
+        FoundSecBrake                 INT,
+        FoundParkBrake                INT,
+        PosSecBrakeLever              INT,
+        LSVFitted                     INT NOT NULL,
+        LSVOption                     INT NOT NULL,
+        ModAxle1Affect                INT NOT NULL,
+        ModAxle2Affect                INT NOT NULL,
+        ModAxle3Affect                INT NOT NULL,
+        ModAxle4Affect                INT NOT NULL,
+        ModAxle5Affect                INT NOT NULL,
+        DoubleDriveFitted             INT NOT NULL,
+        AskThirdDiffFitted            INT NOT NULL
+);
+CREATE TABLE TrailerWeights
+ (
+        NrAxles                       INT,
+        GVWDesign                     INT,
+        Axle1Weight                   INT,
+        Axle2Weight                   INT,
+        Axle3Weight                   INT,
+        Axle4Weight                   INT,
+        Axle5Weight                   INT,
+        Dummy                   INT,
+        TotalAxleWeight               INT,
+        DTpNumber                     Text (14)
+);
+CREATE TABLE VehMake
+ (
+        MakeId                INT NOT NULL,
+        Make                  Text (100) NOT NULL
+);
+CREATE TABLE VehType
+ (
+        TypeId                Text (6) NOT NULL,
+        Type                  Text (100) NOT NULL
+);
+
+CREATE TABLE BrakType
+ (
+       TypeId  INT NOT NULL,
+       Type    Text(64) NOT NULL
+);
+
+CREATE TABLE Version
+ (
+        Version                   Text (20),
+        "Date of update"                DateTime
+);