Structure de la base de données : Différence entre versions
(→Structure) |
|||
(15 révisions intermédiaires par 4 utilisateurs non affichées) | |||
Ligne 10 : | Ligne 10 : | ||
`name` text, | `name` text, | ||
`export_account` varchar(255) DEFAULT NULL, | `export_account` varchar(255) DEFAULT NULL, | ||
− | `activated` tinyint(1) | + | `activated` tinyint(1) NOT NULL DEFAULT '1', |
`category` tinyint(1) unsigned DEFAULT '0', | `category` tinyint(1) unsigned DEFAULT '0', | ||
`account_type` tinyint(1) unsigned DEFAULT '0', | `account_type` tinyint(1) unsigned DEFAULT '0', | ||
Ligne 19 : | Ligne 19 : | ||
`accounting_id` int(10) unsigned DEFAULT NULL, | `accounting_id` int(10) unsigned DEFAULT NULL, | ||
`deactivated_date` datetime DEFAULT NULL, | `deactivated_date` datetime DEFAULT NULL, | ||
+ | `group_sales` tinyint(1) NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`id`), | PRIMARY KEY (`id`), | ||
KEY `idx_owner_id` (`owner_id`) | KEY `idx_owner_id` (`owner_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account'; |
-- | -- | ||
Ligne 31 : | Ligne 32 : | ||
`flow_id` int(11) DEFAULT NULL, | `flow_id` int(11) DEFAULT NULL, | ||
`account_date` datetime DEFAULT NULL, | `account_date` datetime DEFAULT NULL, | ||
+ | `registration_date` datetime DEFAULT NULL, | ||
`account_id` int(11) DEFAULT NULL, | `account_id` int(11) DEFAULT NULL, | ||
`credit` decimal(15,5) DEFAULT '0.00000', | `credit` decimal(15,5) DEFAULT '0.00000', | ||
Ligne 40 : | Ligne 42 : | ||
`validated` int(1) DEFAULT '0', | `validated` int(1) DEFAULT '0', | ||
`exported` int(1) DEFAULT '0', | `exported` int(1) DEFAULT '0', | ||
− | |||
`budget_id` int(10) unsigned DEFAULT NULL, | `budget_id` int(10) unsigned DEFAULT NULL, | ||
`product_id` int(10) unsigned DEFAULT NULL, | `product_id` int(10) unsigned DEFAULT NULL, | ||
+ | `signature` varchar(56) DEFAULT NULL, | ||
+ | `signature_date` bigint(13) unsigned DEFAULT NULL, | ||
+ | `lettering` int(11) DEFAULT NULL, | ||
+ | `lettering_date` datetime DEFAULT NULL, | ||
PRIMARY KEY (`id`), | PRIMARY KEY (`id`), | ||
+ | KEY `idx_account_date` (`account_date`), | ||
KEY `idx_flow_id` (`flow_id`), | KEY `idx_flow_id` (`flow_id`), | ||
− | KEY ` | + | KEY `idx_signature_date` (`signature_date`) |
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account entries'; |
-- | -- | ||
Ligne 66 : | Ligne 72 : | ||
`name` varchar(255) DEFAULT NULL, | `name` varchar(255) DEFAULT NULL, | ||
`category` tinyint(1) unsigned DEFAULT '0', | `category` tinyint(1) unsigned DEFAULT '0', | ||
− | `activated` tinyint(1) DEFAULT '1', | + | `activated` tinyint(1) unsigned DEFAULT '1', |
`order_num` int(11) DEFAULT NULL, | `order_num` int(11) DEFAULT NULL, | ||
`accounting_id` int(10) unsigned DEFAULT NULL, | `accounting_id` int(10) unsigned DEFAULT NULL, | ||
Ligne 81 : | Ligne 87 : | ||
`profile_id` bigint(20) unsigned NOT NULL DEFAULT '0', | `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`account_type_id`,`profile_id`) | PRIMARY KEY (`account_type_id`,`profile_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Linked account type\r\nfield and profile'; |
-- | -- | ||
Ligne 92 : | Ligne 98 : | ||
`unit_name` varchar(255) DEFAULT NULL, | `unit_name` varchar(255) DEFAULT NULL, | ||
`symbol` varchar(255) DEFAULT NULL, | `symbol` varchar(255) DEFAULT NULL, | ||
− | `format` tinyint(1) DEFAULT NULL, | + | `format` tinyint(1) unsigned DEFAULT NULL, |
`decimal_precision` int(10) unsigned DEFAULT '2', | `decimal_precision` int(10) unsigned DEFAULT '2', | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
Ligne 105 : | Ligne 111 : | ||
`profile_id` bigint(20) unsigned NOT NULL DEFAULT '0', | `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`accounting_id`,`profile_id`) | PRIMARY KEY (`accounting_id`,`profile_id`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
+ | |||
+ | -- | ||
+ | -- Table structure for table `activity_training` | ||
+ | -- | ||
+ | |||
+ | CREATE TABLE `activity_training` ( | ||
+ | `activity_id` int(10) unsigned NOT NULL DEFAULT '0', | ||
+ | `theme_id` int(10) unsigned NOT NULL DEFAULT '0', | ||
+ | `student_id` int(10) DEFAULT NULL, | ||
+ | `level_reached` int(10) unsigned DEFAULT NULL, | ||
+ | `comment` varchar(255) DEFAULT NULL, | ||
+ | `validated` tinyint(1) NOT NULL DEFAULT '0', | ||
+ | `checker_person_id` int(10) DEFAULT NULL, | ||
+ | `checking_date` datetime DEFAULT NULL, | ||
+ | `checking_sentence` varchar(255) DEFAULT NULL, | ||
+ | PRIMARY KEY (`activity_id`,`theme_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 117 : | Ligne 140 : | ||
`activated` tinyint(1) NOT NULL DEFAULT '1', | `activated` tinyint(1) NOT NULL DEFAULT '1', | ||
`color` int(10) unsigned DEFAULT NULL, | `color` int(10) unsigned DEFAULT NULL, | ||
+ | `training` tinyint(1) NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight type'; |
-- | -- | ||
Ligne 130 : | Ligne 154 : | ||
`inspection_date` datetime DEFAULT NULL, | `inspection_date` datetime DEFAULT NULL, | ||
`inspection_time` int(11) DEFAULT NULL, | `inspection_time` int(11) DEFAULT NULL, | ||
+ | `tolerance_time` int(11) unsigned DEFAULT '6000', | ||
+ | `last_counter` int(11) DEFAULT NULL, | ||
`interval_visit` int(11) unsigned DEFAULT '30000', | `interval_visit` int(11) unsigned DEFAULT '30000', | ||
`time_alert1` int(11) DEFAULT '6000', | `time_alert1` int(11) DEFAULT '6000', | ||
`time_alert2` int(11) DEFAULT '0', | `time_alert2` int(11) DEFAULT '0', | ||
− | `time_alert3` int(11) DEFAULT ' | + | `time_alert3` int(11) DEFAULT '0', |
`day_alert1` smallint(3) DEFAULT '15', | `day_alert1` smallint(3) DEFAULT '15', | ||
`day_alert2` smallint(3) DEFAULT '0', | `day_alert2` smallint(3) DEFAULT '0', | ||
− | `day_alert3` smallint(3) DEFAULT ' | + | `day_alert3` smallint(3) DEFAULT '8', |
− | + | ||
− | + | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='ALL AIRCRAFTS OF ALL AIRCLUBS'; |
-- | -- | ||
Ligne 147 : | Ligne 171 : | ||
CREATE TABLE `aircraft_type` ( | CREATE TABLE `aircraft_type` ( | ||
− | `id` int(10) unsigned NOT NULL | + | `id` int(10) unsigned NOT NULL, |
− | `flight_time_formula` varchar(255) DEFAULT | + | `flight_time_formula` varchar(255) DEFAULT NULL, |
`counter_state` tinyint(2) NOT NULL DEFAULT '-1', | `counter_state` tinyint(2) NOT NULL DEFAULT '-1', | ||
`tolerance` int(11) DEFAULT '0', | `tolerance` int(11) DEFAULT '0', | ||
`autonomy` int(11) DEFAULT '5990', | `autonomy` int(11) DEFAULT '5990', | ||
+ | `digit_counter_number` tinyint(1) unsigned NOT NULL DEFAULT '4', | ||
`true_air_speed` int(10) unsigned NOT NULL DEFAULT '0', | `true_air_speed` int(10) unsigned NOT NULL DEFAULT '0', | ||
− | |||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of aircraft'; |
-- | -- | ||
Ligne 164 : | Ligne 188 : | ||
`aircraft_type_id` int(10) unsigned DEFAULT NULL, | `aircraft_type_id` int(10) unsigned DEFAULT NULL, | ||
`place_num` int(10) unsigned DEFAULT NULL, | `place_num` int(10) unsigned DEFAULT NULL, | ||
− | `status_id` int(10) | + | `status_id` int(10) DEFAULT NULL |
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of allowed functions for each aircraft type'; |
-- | -- | ||
Ligne 174 : | Ligne 198 : | ||
`aircraft_type_id` int(10) unsigned DEFAULT NULL, | `aircraft_type_id` int(10) unsigned DEFAULT NULL, | ||
`activity_type_id` bigint(20) unsigned DEFAULT NULL | `activity_type_id` bigint(20) unsigned DEFAULT NULL | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of compulsory flight type for each aircraft type'; |
-- | -- | ||
Ligne 183 : | Ligne 207 : | ||
`aircraft_type_id` int(10) unsigned DEFAULT NULL, | `aircraft_type_id` int(10) unsigned DEFAULT NULL, | ||
`activity_type_id` bigint(20) unsigned DEFAULT NULL | `activity_type_id` bigint(20) unsigned DEFAULT NULL | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of uncompatible flight type for each aircraft type'; |
-- | -- | ||
Ligne 191 : | Ligne 215 : | ||
CREATE TABLE `aircraft_type_validity_type` ( | CREATE TABLE `aircraft_type_validity_type` ( | ||
`aircraft_type_id` int(10) unsigned NOT NULL DEFAULT '0', | `aircraft_type_id` int(10) unsigned NOT NULL DEFAULT '0', | ||
− | `validity_type_id` int(10) unsigned NOT NULL | + | `validity_type_id` int(10) unsigned NOT NULL, |
`check_num` int(10) unsigned NOT NULL DEFAULT '0', | `check_num` int(10) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`aircraft_type_id`,`validity_type_id`,`check_num`) | PRIMARY KEY (`aircraft_type_id`,`validity_type_id`,`check_num`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of qualif required for each aircraft type'; | ||
+ | |||
+ | -- | ||
+ | -- Table structure for table `allocation_rule` | ||
+ | -- | ||
+ | |||
+ | CREATE TABLE `allocation_rule` ( | ||
+ | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `title` varchar(255) NOT NULL, | ||
+ | `account_id` int(10) NOT NULL, | ||
+ | `keyword` varchar(255) DEFAULT NULL, | ||
+ | `order_num` int(10) NOT NULL, | ||
+ | `amount` tinyint(1) NOT NULL, | ||
+ | `mandatory` tinyint(1) NOT NULL DEFAULT '0', | ||
+ | PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 202 : | Ligne 241 : | ||
CREATE TABLE `balance` ( | CREATE TABLE `balance` ( | ||
`account_id` int(10) unsigned NOT NULL, | `account_id` int(10) unsigned NOT NULL, | ||
− | `balance_date_id` int(10) unsigned NOT NULL, | + | `balance_date_id` int(10) unsigned NOT NULL DEFAULT '0', |
`debit` decimal(15,5) DEFAULT '0.00000', | `debit` decimal(15,5) DEFAULT '0.00000', | ||
`credit` decimal(15,5) DEFAULT '0.00000', | `credit` decimal(15,5) DEFAULT '0.00000', | ||
Ligne 228 : | Ligne 267 : | ||
`end_date` datetime DEFAULT NULL, | `end_date` datetime DEFAULT NULL, | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='RECORDS ALL THE SLOTS OF ALL AIRCRAFTS OF ALL AIRCLUBS'; |
-- | -- | ||
Ligne 293 : | Ligne 332 : | ||
`group_id` int(10) unsigned NOT NULL DEFAULT '0', | `group_id` int(10) unsigned NOT NULL DEFAULT '0', | ||
`name` varchar(255) DEFAULT NULL, | `name` varchar(255) DEFAULT NULL, | ||
− | `order_num` int(11) | + | `order_num` int(11) NOT NULL, |
`export_code` varchar(255) DEFAULT NULL, | `export_code` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
Ligne 305 : | Ligne 344 : | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) DEFAULT NULL, | `name` varchar(255) DEFAULT NULL, | ||
− | `order_num` int(11) | + | `order_num` int(11) NOT NULL, |
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 316 : | Ligne 355 : | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`variable` varchar(255) DEFAULT NULL, | `variable` varchar(255) DEFAULT NULL, | ||
− | `label` varchar(255) | + | `label` varchar(255) DEFAULT NULL, |
− | `value_type` varchar(40) | + | `value_type` varchar(40) DEFAULT NULL, |
− | `category` varchar(255) | + | `category` varchar(255) DEFAULT NULL, |
− | `order_num` int(11) | + | `order_num` int(11) DEFAULT NULL, |
− | `dsn` varchar(20) DEFAULT | + | `dsn` varchar(20) DEFAULT NULL, |
`compulsory_fill` tinyint(1) DEFAULT '0', | `compulsory_fill` tinyint(1) DEFAULT '0', | ||
`linked_category` varchar(255) DEFAULT NULL, | `linked_category` varchar(255) DEFAULT NULL, | ||
Ligne 329 : | Ligne 368 : | ||
`default_value` text, | `default_value` text, | ||
`placeholder` text, | `placeholder` text, | ||
+ | `access_level_required` tinyint(4) NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`id`), | PRIMARY KEY (`id`), | ||
UNIQUE KEY `variable` (`variable`) | UNIQUE KEY `variable` (`variable`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of extra form field'; |
-- | -- | ||
Ligne 339 : | Ligne 379 : | ||
CREATE TABLE `business_field_activity_type` ( | CREATE TABLE `business_field_activity_type` ( | ||
`business_field_id` int(10) unsigned NOT NULL DEFAULT '0', | `business_field_id` int(10) unsigned NOT NULL DEFAULT '0', | ||
− | `activity_type_id` | + | `activity_type_id` bigint(20) unsigned NOT NULL DEFAULT '0', |
`business_field_group_id` int(10) unsigned NOT NULL DEFAULT '0', | `business_field_group_id` int(10) unsigned NOT NULL DEFAULT '0', | ||
`visibility_type` tinyint(1) unsigned DEFAULT NULL, | `visibility_type` tinyint(1) unsigned DEFAULT NULL, | ||
Ligne 356 : | Ligne 396 : | ||
`placeholder` text, | `placeholder` text, | ||
PRIMARY KEY (`category_id`,`business_field_id`,`person_id`) | PRIMARY KEY (`category_id`,`business_field_id`,`person_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Content of extra form field'; |
-- | -- | ||
Ligne 375 : | Ligne 415 : | ||
CREATE TABLE `criteria` ( | CREATE TABLE `criteria` ( | ||
`id` int(11) NOT NULL AUTO_INCREMENT, | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
− | `label` varchar(255) | + | `label` varchar(255) DEFAULT NULL, |
− | `predicate` text | + | `predicate` text, |
`order_num` int(11) DEFAULT NULL, | `order_num` int(11) DEFAULT NULL, | ||
− | `dsn` varchar(20) DEFAULT 'customer', | + | `dsn` varchar(20) NOT NULL DEFAULT 'customer', |
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 420 : | Ligne 460 : | ||
CREATE TABLE `customer_bill_file` ( | CREATE TABLE `customer_bill_file` ( | ||
+ | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `file_type` varchar(255) DEFAULT NULL, | ||
+ | `content` longblob, | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
+ | |||
+ | -- | ||
+ | -- Table structure for table `customer_receipt_entry` | ||
+ | -- | ||
+ | |||
+ | CREATE TABLE `customer_receipt_entry` ( | ||
+ | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `flow_id` int(10) unsigned DEFAULT NULL, | ||
+ | `account_entry_id` int(10) unsigned DEFAULT NULL, | ||
+ | `account_entry_flow_id` int(10) unsigned DEFAULT NULL, | ||
+ | `owner_category` int(10) unsigned DEFAULT NULL, | ||
+ | `owner_id` int(10) unsigned DEFAULT NULL, | ||
+ | `payment_type_id` int(10) unsigned DEFAULT NULL, | ||
+ | `customer_receipt_id` int(10) unsigned DEFAULT NULL, | ||
+ | `debit` decimal(15,5) DEFAULT '0.00000', | ||
+ | `credit` decimal(15,5) DEFAULT '0.00000', | ||
+ | `receipt_date` datetime DEFAULT NULL, | ||
+ | `owner_email` varchar(255) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `idx_account_entry_id` (`account_entry_id`), | ||
+ | KEY `idx_account_entry_flow_id` (`account_entry_flow_id`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
+ | |||
+ | -- | ||
+ | -- Table structure for table `customer_receipt_file` | ||
+ | -- | ||
+ | |||
+ | CREATE TABLE `customer_receipt_file` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`file_type` varchar(255) DEFAULT NULL, | `file_type` varchar(255) DEFAULT NULL, | ||
Ligne 431 : | Ligne 504 : | ||
CREATE TABLE `default_display` ( | CREATE TABLE `default_display` ( | ||
− | `person_id` int(10) unsigned NOT NULL, | + | `person_id` int(10) unsigned NOT NULL DEFAULT '0', |
`display_key` varchar(255) NOT NULL DEFAULT '', | `display_key` varchar(255) NOT NULL DEFAULT '', | ||
`display_value` text, | `display_value` text, | ||
Ligne 443 : | Ligne 516 : | ||
CREATE TABLE `default_multi_display` ( | CREATE TABLE `default_multi_display` ( | ||
`resource_type` char(30) NOT NULL, | `resource_type` char(30) NOT NULL, | ||
− | `person_id` int(10) unsigned NOT NULL, | + | `person_id` int(10) unsigned NOT NULL DEFAULT '0', |
− | `resource_id` | + | `resource_id` varchar(100) NOT NULL, |
`display_value` text, | `display_value` text, | ||
PRIMARY KEY (`resource_type`,`person_id`,`resource_id`) | PRIMARY KEY (`resource_type`,`person_id`,`resource_id`) | ||
Ligne 524 : | Ligne 597 : | ||
CREATE TABLE `favorite_icao` ( | CREATE TABLE `favorite_icao` ( | ||
− | `icao` varchar(6) NOT NULL, | + | `icao` varchar(6) NOT NULL DEFAULT '', |
PRIMARY KEY (`icao`) | PRIMARY KEY (`icao`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='favorite airfield list'; |
-- | -- | ||
Ligne 535 : | Ligne 608 : | ||
`report_id` int(10) unsigned NOT NULL, | `report_id` int(10) unsigned NOT NULL, | ||
PRIMARY KEY (`report_id`) | PRIMARY KEY (`report_id`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
+ | |||
+ | -- | ||
+ | -- Table structure for table `favorite_report_business_field` | ||
+ | -- | ||
+ | |||
+ | CREATE TABLE `favorite_report_business_field` ( | ||
+ | `report_id` int(10) unsigned NOT NULL, | ||
+ | `business_field_id` int(10) unsigned NOT NULL, | ||
+ | `default_value` text, | ||
+ | PRIMARY KEY (`report_id`,`business_field_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 555 : | Ligne 639 : | ||
`aircraft_type_id` int(10) NOT NULL DEFAULT '0', | `aircraft_type_id` int(10) NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`fhp_id`,`aircraft_type_id`) | PRIMARY KEY (`fhp_id`,`aircraft_type_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='flight hour pricing aircraft type list'; |
-- | -- | ||
Ligne 566 : | Ligne 650 : | ||
`excluded` tinyint(1) unsigned DEFAULT '0', | `excluded` tinyint(1) unsigned DEFAULT '0', | ||
PRIMARY KEY (`fhp_id`,`activity_type_id`) | PRIMARY KEY (`fhp_id`,`activity_type_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='flight hour pricing flight type list'; |
-- | -- | ||
Ligne 586 : | Ligne 670 : | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) DEFAULT NULL, | `name` varchar(255) DEFAULT NULL, | ||
− | `content` | + | `content` longblob, |
`file_type` varchar(255) DEFAULT NULL, | `file_type` varchar(255) DEFAULT NULL, | ||
`category` tinyint(1) unsigned DEFAULT NULL, | `category` tinyint(1) unsigned DEFAULT NULL, | ||
+ | `owner_id` int(10) DEFAULT NULL, | ||
+ | `file_group_id` int(10) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
+ | |||
+ | -- | ||
+ | -- Table structure for table `file_group` | ||
+ | -- | ||
+ | |||
+ | CREATE TABLE `file_group` ( | ||
+ | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `label` varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 607 : | Ligne 703 : | ||
`counter_departure` int(10) unsigned DEFAULT NULL, | `counter_departure` int(10) unsigned DEFAULT NULL, | ||
`counter_arrival` int(10) unsigned DEFAULT NULL, | `counter_arrival` int(10) unsigned DEFAULT NULL, | ||
− | `landing_number` int(10) | + | `landing_number` int(10) DEFAULT NULL, |
`airborne` tinyint(1) unsigned DEFAULT NULL, | `airborne` tinyint(1) unsigned DEFAULT NULL, | ||
`validated` tinyint(3) unsigned DEFAULT '0', | `validated` tinyint(3) unsigned DEFAULT '0', | ||
+ | `departure_icao_id` varchar(6) DEFAULT NULL, | ||
+ | `arrival_icao_id` varchar(6) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight'; |
-- | -- | ||
Ligne 622 : | Ligne 720 : | ||
PRIMARY KEY (`flight_id`,`account_entry_id`), | PRIMARY KEY (`flight_id`,`account_entry_id`), | ||
KEY `idx_account_entry_id` (`account_entry_id`) | KEY `idx_account_entry_id` (`account_entry_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='flight account entry join'; |
-- | -- | ||
Ligne 640 : | Ligne 738 : | ||
`order_num` int(11) DEFAULT NULL, | `order_num` int(11) DEFAULT NULL, | ||
`product_id` int(10) unsigned DEFAULT NULL, | `product_id` int(10) unsigned DEFAULT NULL, | ||
− | `sale_trigger_id` int(10) unsigned DEFAULT | + | `sale_trigger_id` int(10) unsigned DEFAULT NULL, |
`query` text, | `query` text, | ||
− | `variable_formula` | + | `variable_formula` varchar(255) DEFAULT NULL, |
`business_field_id` int(10) unsigned DEFAULT NULL, | `business_field_id` int(10) unsigned DEFAULT NULL, | ||
`debit_bill_num` int(10) unsigned DEFAULT NULL, | `debit_bill_num` int(10) unsigned DEFAULT NULL, | ||
Ligne 649 : | Ligne 747 : | ||
`unit_price_formula` text, | `unit_price_formula` text, | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight hours pricing formula'; |
-- | -- | ||
Ligne 658 : | Ligne 756 : | ||
`flight_id` int(10) unsigned NOT NULL, | `flight_id` int(10) unsigned NOT NULL, | ||
`pilot_id` int(10) unsigned NOT NULL, | `pilot_id` int(10) unsigned NOT NULL, | ||
− | `status_id` int(10) | + | `status_id` int(10) DEFAULT NULL, |
`num` int(10) unsigned NOT NULL DEFAULT '0', | `num` int(10) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`flight_id`,`pilot_id`,`num`) | PRIMARY KEY (`flight_id`,`pilot_id`,`num`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of crew for each flight'; |
-- | -- | ||
Ligne 671 : | Ligne 769 : | ||
`flight_id` int(10) unsigned NOT NULL, | `flight_id` int(10) unsigned NOT NULL, | ||
`tank_id` int(10) unsigned NOT NULL, | `tank_id` int(10) unsigned NOT NULL, | ||
− | `quantity` varchar(255) | + | `quantity` varchar(255) DEFAULT NULL, |
`after_flight` tinyint(1) NOT NULL DEFAULT '0', | `after_flight` tinyint(1) NOT NULL DEFAULT '0', | ||
`account_id` int(10) unsigned DEFAULT NULL, | `account_id` int(10) unsigned DEFAULT NULL, | ||
Ligne 683 : | Ligne 781 : | ||
CREATE TABLE `flight_track` ( | CREATE TABLE `flight_track` ( | ||
− | ` | + | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, |
− | ` | + | `flight_id` int(10) NOT NULL, |
− | PRIMARY KEY (` | + | `track` mediumblob NOT NULL, |
+ | PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
Ligne 694 : | Ligne 793 : | ||
CREATE TABLE `flight_type_mandatory_validity_type` ( | CREATE TABLE `flight_type_mandatory_validity_type` ( | ||
`activity_type_id` bigint(20) unsigned NOT NULL DEFAULT '0', | `activity_type_id` bigint(20) unsigned NOT NULL DEFAULT '0', | ||
− | `validity_type_id` int(10) unsigned NOT NULL | + | `validity_type_id` int(10) unsigned NOT NULL, |
PRIMARY KEY (`activity_type_id`,`validity_type_id`) | PRIMARY KEY (`activity_type_id`,`validity_type_id`) | ||
− | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | + | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of mandatory qualification for each flight type'; |
-- | -- | ||
Ligne 723 : | Ligne 822 : | ||
CREATE TABLE `ip_stopped` ( | CREATE TABLE `ip_stopped` ( | ||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
− | `ip` varchar(255) | + | `ip` varchar(255) DEFAULT NULL, |
`counter` tinyint(1) unsigned NOT NULL,< |