Skip to content

Commit 5c2f316

Browse files
Update SQL schema for Vehicle
1 parent 17c0802 commit 5c2f316

1 file changed

Lines changed: 69 additions & 3 deletions

File tree

Vehicle/schema.sql

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1-
/* (Beta) Export of data model Vehicle of the subject dataModel.Transportation for a PostgreSQL database. Pending translation of enumerations and multityped attributes */
2-
CREATE TYPE deviceBatteryStatus_type AS ENUM ('connected','disconnected');CREATE TYPE emergencyVehicleType_type AS ENUM ('policeCar','policeMotorcycle','policeVan','policeSWAT','fireEngine','waterTender','airAmbulance','ambulance','motorcycleAmbulance','rescueVehicle','hazardousMaterialsApparatus','towTruck');CREATE TYPE serviceStatus_type AS ENUM ('broken','onRoute','outOfService','parked');CREATE TYPE Vehicle_type AS ENUM ('Vehicle');CREATE TYPE vehicleRunningStatus_type AS ENUM ('running','stopped','waiting');CREATE TYPE vehicleSpecialUsage_type AS ENUM ('ambulance','fireBrigade','military','police','schoolTransportation','taxi','trashManagement');CREATE TYPE vehicleType_type AS ENUM ('agriculturalVehicle','ambulance','anyVehicle','articulatedVehicle','autorickshaw','bicycle','binTrolley','BRT mini bus·','BRT bus','bus','car','caravan','carOrLightVehicle','carWithCaravan','carWithTrailer','cleaningTrolley','compactor','constructionOrMaintenanceVehicle','dumper','e-bike','e-moped','e-scooter','e-motorcycle','fireTender','fourWheelDrive','highSidedVehicle','hopper','lorry','minibus','moped','motorcycle','motorcycleWithSideCar','motorscooter','policeVan','publicMotor','sweepingMachine','tanker','tempo','threeWheeledVehicle','tipper','trailer','tram','trolley','twoWheeledVehicle','van','vehicleWithoutCatalyticConverter','vehicleWithCaravan','vehicleWithTrailer','withEvenNumberedRegistrationPlates','withOddNumberedRegistrationPlates','pilotVessel','passengerVessel','cargoVessel','tug','militaryVessel','sailingVessel','vessel','other');
3-
CREATE TABLE Vehicle (address JSON, alternateName TEXT, annotations JSON, areaServed TEXT, battery NUMERIC, bearing NUMERIC, cargoWeight NUMERIC, category JSON, color TEXT, currentTripCount NUMERIC, dataProvider TEXT, dateCreated TIMESTAMP, dateFirstUsed DATE, dateModified TIMESTAMP, dateVehicleFirstRegistered DATE, description TEXT, deviceBatteryStatus deviceBatteryStatus_type, deviceSimNumber TEXT, emergencyVehicleType emergencyVehicleType_type, feature JSON, fleetVehicleId TEXT, fuelEfficiency NUMERIC, fuelFilled NUMERIC, fuelType TEXT, heading JSON, id TEXT PRIMARY KEY, ignitionStatus BOOLEAN, image TEXT, license_plate TEXT, location JSON, mileageFromOdometer NUMERIC, municipalityInfo JSON, name TEXT, observationDateTime TIMESTAMP, owner JSON, previousLocation JSON, purchaseDate TIMESTAMP, reportId TEXT, seeAlso JSON, serviceOnDuty BOOLEAN, serviceProvided JSON, serviceStatus serviceStatus_type, source TEXT, speed JSON, tripNetWeightCollected NUMERIC, type Vehicle_type, vehicleAltitude TEXT, vehicleConfiguration TEXT, vehicleIdentificationNumber TEXT, vehiclePlateIdentifier TEXT, vehicleRunningStatus vehicleRunningStatus_type, vehicleSpecialUsage vehicleSpecialUsage_type, vehicleTrackerDevice TEXT, vehicleType vehicleType_type, wardId TEXT, wardName TEXT, zoneName TEXT);
1+
/* (Beta) Export of data model Vehicle of the subject dataModel.Transportation
2+
for a PostgreSQL database. Pending translation of enumerations and multityped attributes */
3+
CREATE TYPE deviceBatteryStatus_type AS ENUM ('connected', 'disconnected');
4+
CREATE TYPE emergencyVehicleType_type AS ENUM ('policeCar', 'policeMotorcycle', 'policeVan', 'policeSWAT', 'fireEngine', 'waterTender', 'airAmbulance', 'ambulance', 'motorcycleAmbulance', 'rescueVehicle', 'hazardousMaterialsApparatus', 'towTruck');
5+
CREATE TYPE serviceStatus_type AS ENUM ('broken', 'onRoute', 'outOfService', 'parked');
6+
CREATE TYPE Vehicle_type AS ENUM ('Vehicle');
7+
CREATE TYPE vehicleRunningStatus_type AS ENUM ('running', 'stopped', 'waiting');
8+
CREATE TYPE vehicleSpecialUsage_type AS ENUM ('ambulance', 'fireBrigade', 'military', 'police', 'schoolTransportation', 'taxi', 'trashManagement');
9+
CREATE TYPE vehicleType_type AS ENUM ('agriculturalVehicle', 'ambulance', 'anyVehicle', 'articulatedVehicle', 'autorickshaw', 'bicycle', 'binTrolley', 'BRT mini bus·', 'BRT bus', 'bus', 'car', 'caravan', 'carOrLightVehicle', 'carWithCaravan', 'carWithTrailer', 'cleaningTrolley', 'compactor', 'constructionOrMaintenanceVehicle', 'dumper', 'e-bike', 'e-moped', 'e-scooter', 'e-motorcycle', 'fireTender', 'fourWheelDrive', 'highSidedVehicle', 'hopper', 'lorry', 'minibus', 'moped', 'motorcycle', 'motorcycleWithSideCar', 'motorscooter', 'policeVan', 'publicMotor', 'sweepingMachine', 'tanker', 'tempo', 'threeWheeledVehicle', 'tipper', 'trailer', 'tram', 'trolley', 'twoWheeledVehicle', 'van', 'vehicleWithoutCatalyticConverter', 'vehicleWithCaravan', 'vehicleWithTrailer', 'withEvenNumberedRegistrationPlates', 'withOddNumberedRegistrationPlates', 'pilotVessel', 'passengerVessel', 'cargoVessel', 'tug', 'militaryVessel', 'sailingVessel', 'vessel', 'other');
10+
11+
CREATE TABLE Vehicle (
12+
address JSON,
13+
alternateName TEXT,
14+
annotations JSON,
15+
areaServed TEXT,
16+
battery NUMERIC,
17+
bearing NUMERIC,
18+
cargoWeight NUMERIC,
19+
category JSON,
20+
color TEXT,
21+
currentTripCount NUMERIC,
22+
dataProvider TEXT,
23+
dateCreated TIMESTAMP,
24+
dateFirstUsed DATE,
25+
dateModified TIMESTAMP,
26+
dateVehicleFirstRegistered DATE,
27+
description TEXT,
28+
deviceBatteryStatus deviceBatteryStatus_type,
29+
deviceSimNumber TEXT,
30+
emergencyVehicleType emergencyVehicleType_type,
31+
feature JSON,
32+
fleetVehicleId TEXT,
33+
fuelEfficiency NUMERIC,
34+
fuelFilled NUMERIC,
35+
fuelType TEXT,
36+
heading JSON,
37+
id TEXT PRIMARY KEY,
38+
ignitionStatus BOOLEAN,
39+
image TEXT,
40+
license_plate TEXT,
41+
location JSON,
42+
mileageFromOdometer NUMERIC,
43+
municipalityInfo JSON,
44+
name TEXT,
45+
observationDateTime TIMESTAMP,
46+
owner JSON,
47+
previousLocation JSON,
48+
purchaseDate TIMESTAMP,
49+
reportId TEXT,
50+
seeAlso JSON,
51+
serviceOnDuty BOOLEAN,
52+
serviceProvided JSON,
53+
serviceStatus serviceStatus_type,
54+
source TEXT,
55+
speed JSON,
56+
tripNetWeightCollected NUMERIC,
57+
type Vehicle_type,
58+
vehicleAltitude TEXT,
59+
vehicleConfiguration TEXT,
60+
vehicleIdentificationNumber TEXT,
61+
vehiclePlateIdentifier TEXT,
62+
vehicleRunningStatus vehicleRunningStatus_type,
63+
vehicleSpecialUsage vehicleSpecialUsage_type,
64+
vehicleTrackerDevice TEXT,
65+
vehicleType vehicleType_type,
66+
wardId TEXT,
67+
wardName TEXT,
68+
zoneName TEXT
69+
);

0 commit comments

Comments
 (0)