Aircrafts Table
From Openflyers
Contents |
Contenu actuel de la table aircrafts
| nom du champ | type | description |
|---|---|---|
| NUM | int(10) | Aircraft ID (PRIMARY KEY) |
| CALLSIGN | varchar(255) | Aircraft Callsign (UNIQUE) |
| TYPE | varchar(255) | Aircraft Type |
| FLIGHT_HOUR_COSTS | varchar(255) | Aircraft flight hour cost |
| SEATS_AVAILABLE | tinyint(3) | Number of seats in the aircraft |
| COMMENTS | varchar(255) | Comments on the aircraft |
| ORDER_NUM | int(10) | Used to sort all aircrafts (UNIQUE) |
Nouvelle table aircraft_type
| nom du champ | type | description |
|---|---|---|
| id | int(10) | ID (PRIMARY KEY) |
| admin_desc | varchar(255) | AircraftType's description for admin (UNIQUE) |
| name | varchar(255) | AircraftType's name |
| seats_available | tinyint(3) | Number of seats in the aircraft |
| comments | varchar(255) | Comments on the type of the aircraft |
| order_num | int(10) | Used to sort all types (UNIQUE) |
| flight_time_formula | VARCHAR(255) | Formule pour calculer le temps de vol |
| counter_state | TINYINT | 0 = heures minutes
1 = heures centiemes |
| TOLERANCE | INT | Counter tolerance en sexacentimal |
| autonomy | INT | Autonomy |
Le champ type de la table aicraft passe de VARCHAR(255) à INT(10) et pointe sur le id de la table aircraft_type
Le champ seats_available de la table aircraft disparait
Ajouts dans la table aircrafts
Pour le calcul des potentiels restants
| Champ | Type | Défaut | Extra | Description |
|---|---|---|---|---|
| REF_DATE | DATE | 0000-00-00 | Reference date
No data should be recorded in Flight table before this date | |
| REF_HRS | INT | 0 | Total time at Ref_date in minute | |
| INSP_DATE | DATE | 0 | Last inspection date | |
| INSP_TIME | INT | 0 | Last inspection time | |
| INTERVAL_VISIT | TINYINT | 50 | Time between 2 visit | |
| TOLERANCE_TIME | TINYINT | 10 | Maximum over time allocated |
Penser à faire un script qui update les champs ref_date et insp_date (qui sont nulls quand on alter la table aircrafts, même en mettant DEFAULT 0 ...) pour y mettre 0.
Pour les temps de vol et les vérifications
| Champ | Type | Défaut | Extra | Description |
|---|---|---|---|---|
| LAST_COUNTER | INT | 0 | Last counter | |
| ACTIVATED | TINYINT | 1 | 0 = no active
1 = Active aircraft |
Pour les places autorisées par type d'avion
Création de la table aircrafttype_allowed_function
| Champ | Type | Défaut | Description |
|---|---|---|---|
| id_aircraft_type | INT | id de l'avion | |
| place_num | INT | numéro de place (commence à 0) | |
| id_function | INT | id de la fonction de la personne assise la place numero place_num
[} |

