Structure de la base de données: Difference between revisions

From Documentation de la solution web de gestion OpenFlyers
Jump to navigation Jump to search
imported>Claratte
imported>Jcheng
Line 21: Line 21:
   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';


--
--
Line 46: Line 46:
   KEY `idx_flow_id` (`flow_id`),
   KEY `idx_flow_id` (`flow_id`),
   KEY `idx_account_date` (`account_date`)
   KEY `idx_account_date` (`account_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account entries';


--
--
Line 71: Line 71:
   `export_account_pattern` varchar(255) DEFAULT NULL,
   `export_account_pattern` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account type';


--
--
Line 81: Line 81:
   `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 and profile';


--
--
Line 118: Line 118:
   `color` int(10) unsigned DEFAULT NULL,
   `color` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight type';


--
--
Line 140: Line 140:
   `tolerance_time` int(10) unsigned DEFAULT '6000',
   `tolerance_time` int(10) unsigned DEFAULT '6000',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='ALL AIRCRAFTS OF ALL AIRCLUBS';


--
--
Line 155: Line 155:
   `digit_counter_number` tinyint(1) unsigned NOT NULL DEFAULT '4',
   `digit_counter_number` tinyint(1) unsigned NOT NULL DEFAULT '4',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of aircraft';


--
--
Line 165: Line 165:
   `place_num` int(10) unsigned DEFAULT NULL,
   `place_num` int(10) unsigned DEFAULT NULL,
   `status_id` int(10) unsigned DEFAULT NULL
   `status_id` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of allowed functions for each aircraft type';


--
--
Line 174: Line 174:
   `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';


--
--
Line 183: Line 183:
   `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';


--
--
Line 194: Line 194:
   `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;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of qualif required for each aircraft type';


--
--
Line 206: Line 206:
   `credit` decimal(15,5) DEFAULT '0.00000',
   `credit` decimal(15,5) DEFAULT '0.00000',
   PRIMARY KEY (`account_id`,`balance_date_id`)
   PRIMARY KEY (`account_id`,`balance_date_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of balance';


--
--
Line 216: Line 216:
   `balance_date` datetime DEFAULT NULL,
   `balance_date` datetime DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of balance date';


--
--
Line 228: Line 228:
   `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';


--
--
Line 296: Line 296:
   `export_code` varchar(255) DEFAULT NULL,
   `export_code` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of budget';


--
--
Line 307: Line 307:
   `order_num` int(11) DEFAULT NULL,
   `order_num` int(11) DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of budget group';


--
--
Line 331: Line 331:
   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';


--
--
Line 356: Line 356:
   `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';


--
--
Line 380: Line 380:
   `dsn` varchar(20) DEFAULT 'customer',
   `dsn` varchar(20) DEFAULT 'customer',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of criteria';


--
--
Line 424: Line 424:
   `content` longblob,
   `content` longblob,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of customer bill stored file';


--
--
Line 435: Line 435:
   `display_value` text,
   `display_value` text,
   PRIMARY KEY (`person_id`,`display_key`)
   PRIMARY KEY (`person_id`,`display_key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of default display parameters';


--
--
Line 447: Line 447:
   `display_value` text,
   `display_value` text,
   PRIMARY KEY (`resource_type`,`person_id`,`resource_id`)
   PRIMARY KEY (`resource_type`,`person_id`,`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of default multi display parameters';


--
--
Line 502: Line 502:
   `booking_popup_display_4_profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
   `booking_popup_display_4_profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
   PRIMARY KEY (`business_field_id`,`booking_popup_display_4_profile_id`)
   PRIMARY KEY (`business_field_id`,`booking_popup_display_4_profile_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Linked extra field and profile';


--
--
Line 517: Line 517:
   `description` text,
   `description` text,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of user picture';


--
--
Line 526: Line 526:
   `icao` varchar(6) NOT NULL,
   `icao` varchar(6) NOT NULL,
   PRIMARY KEY (`icao`)
   PRIMARY KEY (`icao`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='favorite airfield list';


--
--
Line 555: Line 555:
   `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';


--
--
Line 566: Line 566:
   `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';


--
--
Line 590: Line 590:
   `category` tinyint(1) unsigned DEFAULT NULL,
   `category` tinyint(1) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stored file';


--
--
Line 611: Line 611:
   `validated` tinyint(3) unsigned DEFAULT '0',
   `validated` tinyint(3) unsigned DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight';


--
--
Line 622: Line 622:
   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';


--
--
Line 649: Line 649:
   `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';


--
--
Line 661: Line 661:
   `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';


--
--
Line 676: Line 676:
   `pay_type` tinyint(1) unsigned DEFAULT NULL,
   `pay_type` tinyint(1) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of flight tank quantities';


--
--
Line 686: Line 686:
   `track_id` int(10) unsigned NOT NULL,
   `track_id` int(10) unsigned NOT NULL,
   PRIMARY KEY (`track_id`,`flight_id`)
   PRIMARY KEY (`track_id`,`flight_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Link between flight and track';


--
--
Line 696: Line 696:
   `validity_type_id` int(10) unsigned NOT NULL DEFAULT '0',
   `validity_type_id` int(10) unsigned NOT NULL DEFAULT '0',
   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';


--
--
Line 715: Line 715:
   `sync_task_name` varchar(255) DEFAULT NULL,
   `sync_task_name` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of import';


--
--
Line 727: Line 727:
   `expire_date` datetime NOT NULL,
   `expire_date` datetime NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='BLACKLISTED IP';


--
--
Line 744: Line 744:
   KEY `idx_date_log` (`date_log`),
   KEY `idx_date_log` (`date_log`),
   KEY `idx_action` (`action`(8))
   KEY `idx_action` (`action`(8))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of logs';


--
--
Line 755: Line 755:
   `status` int(10) unsigned NOT NULL DEFAULT '0',
   `status` int(10) unsigned NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Key alerts';


--
--
Line 768: Line 768:
   `key_word` bigint(20) unsigned DEFAULT '0',
   `key_word` bigint(20) unsigned DEFAULT '0',
   PRIMARY KEY (`key_id`)
   PRIMARY KEY (`key_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='key assignment description';


--
--
Line 781: Line 781:
   `httpport` int(11) NOT NULL DEFAULT '4080',
   `httpport` int(11) NOT NULL DEFAULT '4080',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='key host configuration';


--
--
Line 797: Line 797:
   `error` varchar(255) DEFAULT NULL,
   `error` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Key logs';


--
--
Line 814: Line 814:
   PRIMARY KEY (`id`),
   PRIMARY KEY (`id`),
   UNIQUE KEY `icao_name` (`icao_name`)
   UNIQUE KEY `icao_name` (`icao_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='airfields coord';


--
--
Line 828: Line 828:
   KEY `idx_journal_id` (`journal_id`),
   KEY `idx_journal_id` (`journal_id`),
   KEY `idx_field_value` (`field_value`)
   KEY `idx_field_value` (`field_value`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='part of logs';


--
--
Line 841: Line 841:
   `order_num` int(10) unsigned NOT NULL,
   `order_num` int(10) unsigned NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Logger parameters';


--
--
Line 853: Line 853:
   `expire_date` datetime NOT NULL,
   `expire_date` datetime NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='BLACKLISTED LOGIN';


--
--
Line 942: Line 942:
   `count_data` int(10) unsigned NOT NULL,
   `count_data` int(10) unsigned NOT NULL,
   PRIMARY KEY (`record_id`)
   PRIMARY KEY (`record_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Link between flight and track';


--
--
Line 960: Line 960:
   `visible` tinyint(1) unsigned NOT NULL DEFAULT '1',
   `visible` tinyint(1) unsigned NOT NULL DEFAULT '1',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Tracks split from GDR';


--
--
Line 970: Line 970:
   `label` varchar(255) NOT NULL,
   `label` varchar(255) NOT NULL,
   PRIMARY KEY (`code`)
   PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of nationalities';


--
--
Line 983: Line 983:
   `char_value` text,
   `char_value` text,
   PRIMARY KEY (`code`,`key_id`)
   PRIMARY KEY (`code`,`key_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='APPLICATION PARAMETERS';


--
--
Line 996: Line 996:
   `treasury_budget_id` int(10) unsigned DEFAULT NULL,
   `treasury_budget_id` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`payment_id`)
   PRIMARY KEY (`payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='payment distribution description';


--
--
Line 1,025: Line 1,025:
   `pos_key_id` int(10) unsigned DEFAULT NULL,
   `pos_key_id` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='type of payment description';


--
--
Line 1,062: Line 1,062:
   PRIMARY KEY (`id`),
   PRIMARY KEY (`id`),
   UNIQUE KEY `idx_name` (`name`)
   UNIQUE KEY `idx_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='used for authentication';


--
--
Line 1,077: Line 1,077:
   `used` tinyint(1) unsigned DEFAULT NULL,
   `used` tinyint(1) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='member_awaiting_activation';


--
--
Line 1,092: Line 1,092:
   `sale_type` tinyint(1) unsigned DEFAULT NULL,
   `sale_type` tinyint(1) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of sale type';


--
--
Line 1,217: Line 1,217:
   `token` text,
   `token` text,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of waiting cash transactions';


--
--
Line 1,257: Line 1,257:
   `physical` int(10) unsigned DEFAULT '1',
   `physical` int(10) unsigned DEFAULT '1',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of resource';


--
--
Line 1,301: Line 1,301:
   `pictogram` int(10) unsigned DEFAULT NULL,
   `pictogram` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of resource type';


--
--
Line 1,325: Line 1,325:
   `stock_variation_qty_per_sale` float NOT NULL DEFAULT '0',
   `stock_variation_qty_per_sale` float NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock put into sale';


--
--
Line 1,340: Line 1,340:
   UNIQUE KEY `validity_type_id` (`validity_type_id`),
   UNIQUE KEY `validity_type_id` (`validity_type_id`),
   KEY `idx_product` (`product_id`)
   KEY `idx_product` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of validity type into sale';


--
--
Line 1,364: Line 1,364:
   `added_product_id` int(10) unsigned DEFAULT NULL,
   `added_product_id` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of sale pricing formula';


--
--
Line 1,398: Line 1,398:
   `validate_entry` tinyint(1) DEFAULT '0',
   `validate_entry` tinyint(1) DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of sale trigger';


--
--
Line 1,435: Line 1,435:
   `pictogram` int(10) unsigned DEFAULT NULL,
   `pictogram` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of functions for pilot';


--
--
Line 1,446: Line 1,446:
   `stock_type_id` int(10) unsigned NOT NULL,
   `stock_type_id` int(10) unsigned NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock';


--
--
Line 1,458: Line 1,458:
   `stock_date` datetime DEFAULT NULL,
   `stock_date` datetime DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock level';


--
--
Line 1,469: Line 1,469:
   `unit` varchar(255) NOT NULL,
   `unit` varchar(255) NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock type';


--
--
Line 1,482: Line 1,482:
   `validated` tinyint(1) unsigned DEFAULT '0',
   `validated` tinyint(1) unsigned DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock variation';


--
--
Line 1,495: Line 1,495:
   PRIMARY KEY (`product_id`,`stock_variation_id`,`account_entry_flow_id`),
   PRIMARY KEY (`product_id`,`stock_variation_id`,`account_entry_flow_id`),
   KEY `idx_account_entry_flow_id` (`account_entry_flow_id`)
   KEY `idx_account_entry_flow_id` (`account_entry_flow_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock variation account entry';


--
--
Line 1,535: Line 1,535:
   `business` text,
   `business` text,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='DESCRIPTION OF ALL AIRCLUBS';


--
--
Line 1,549: Line 1,549:
   `validated` tinyint(1) DEFAULT '0',
   `validated` tinyint(1) DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of supplier bill';


--
--
Line 1,560: Line 1,560:
   PRIMARY KEY (`supplier_bill_id`,`account_entry_flow_id`),
   PRIMARY KEY (`supplier_bill_id`,`account_entry_flow_id`),
   KEY `idx_account_entry_flow_id` (`account_entry_flow_id`)
   KEY `idx_account_entry_flow_id` (`account_entry_flow_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of account entry for each supplier bill';


--
--
Line 1,576: Line 1,576:
   `vat_budget_id` int(10) unsigned DEFAULT NULL,
   `vat_budget_id` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of supplier bill type';


--
--
Line 1,602: Line 1,602:
   `unlimited_quantity` int(10) unsigned DEFAULT '1',
   `unlimited_quantity` int(10) unsigned DEFAULT '1',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of tanks';


--
--
Line 1,618: Line 1,618:
   `additional_information` int(10) unsigned DEFAULT NULL,
   `additional_information` int(10) unsigned DEFAULT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of flight record';


--
--
Line 1,642: Line 1,642:
   PRIMARY KEY (`id`),
   PRIMARY KEY (`id`),
   KEY `idx_record_id` (`record_id`)
   KEY `idx_record_id` (`record_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of flight record data';


--
--
Line 1,661: Line 1,661:
   `id1` int(10) unsigned DEFAULT NULL,
   `id1` int(10) unsigned DEFAULT NULL,
   `id2` int(10) unsigned DEFAULT NULL
   `id2` int(10) unsigned DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of sales';


--
--
Line 1,672: Line 1,672:
   `expire_date` date DEFAULT NULL,
   `expire_date` date DEFAULT NULL,
   `no_alert` tinyint(1) unsigned NOT NULL DEFAULT '0',
   `no_alert` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `DOCU` set('oui','non') NOT NULL DEFAULT 'non',
   `ident_value` varchar(255) DEFAULT NULL,
   `ident_value` varchar(255) DEFAULT NULL,
   `grant_date` date DEFAULT NULL,
   `grant_date` date DEFAULT NULL,
   PRIMARY KEY (`person_id`,`validity_type_id`)
   PRIMARY KEY (`person_id`,`validity_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='QUALIFICATIONS OF EACH MEMBER';


--
--
Line 1,693: Line 1,692:
   `mandatory_access_control` tinyint(1) unsigned DEFAULT '0',
   `mandatory_access_control` tinyint(1) unsigned DEFAULT '0',
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='QUALIFICATIONS LIST';


--
--
Line 1,707: Line 1,706:
   `order_num` int(11) NOT NULL,
   `order_num` int(11) NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='pricing_variable';


--
--
Line 1,719: Line 1,718:
   `start_date` datetime NOT NULL,
   `start_date` datetime NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='pricing_value';


--
--
Line 1,732: Line 1,731:
   `content` text,
   `content` text,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of web feed';


--
--
Line 1,742: Line 1,741:
   `label` varchar(255) NOT NULL,
   `label` varchar(255) NOT NULL,
   PRIMARY KEY (`id`)
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;</sql>
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of web feed channel';</sql>


=Description=
=Description=

Revision as of 08:36, 13 November 2017

Structure

<sql>-- -- Table structure for table `account` --

CREATE TABLE `account` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `creation_date` date DEFAULT NULL,
 `name` text,
 `export_account` varchar(255) DEFAULT NULL,
 `activated` tinyint(1) unsigned NOT NULL DEFAULT '1',
 `category` tinyint(1) unsigned DEFAULT '0',
 `account_type` tinyint(1) unsigned DEFAULT '0',
 `owner_id` int(10) unsigned NOT NULL DEFAULT '0',
 `payment_allowed` tinyint(1) DEFAULT '0',
 `budget_id` int(10) unsigned DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `accounting_id` int(10) unsigned DEFAULT NULL,
 `deactivated_date` datetime DEFAULT NULL,
 PRIMARY KEY (`id`),
 KEY `idx_owner_id` (`owner_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account';

-- -- Table structure for table `account_entry` --

CREATE TABLE `account_entry` (

 `id` int(11) NOT NULL AUTO_INCREMENT,
 `flow_id` int(11) DEFAULT NULL,
 `account_date` datetime DEFAULT NULL,
 `account_id` int(11) DEFAULT NULL,
 `credit` decimal(15,5) DEFAULT '0.00000',
 `debit` decimal(15,5) DEFAULT '0.00000',
 `payment_type` int(10) unsigned DEFAULT NULL,
 `payment_description` text,
 `person_delivery_id` int(10) unsigned DEFAULT NULL,
 `comments` text,
 `validated` int(1) DEFAULT '0',
 `exported` int(1) DEFAULT '0',
 `registration_date` datetime DEFAULT NULL,
 `budget_id` int(10) unsigned DEFAULT NULL,
 `product_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`),
 KEY `idx_flow_id` (`flow_id`),
 KEY `idx_account_date` (`account_date`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account entries';

-- -- Table structure for table `account_link` --

CREATE TABLE `account_link` (

 `account_id` int(10) unsigned NOT NULL DEFAULT '0',
 `linked_account_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`account_id`,`linked_account_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `account_type` --

CREATE TABLE `account_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `category` tinyint(1) unsigned DEFAULT '0',
 `activated` tinyint(1) DEFAULT '1',
 `order_num` int(11) DEFAULT NULL,
 `accounting_id` int(10) unsigned DEFAULT NULL,
 `export_account_pattern` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of account type';

-- -- Table structure for table `account_type_profile` --

CREATE TABLE `account_type_profile` (

 `account_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`account_type_id`,`profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Linked account type and profile';

-- -- Table structure for table `accounting` --

CREATE TABLE `accounting` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `unit_name` varchar(255) DEFAULT NULL,
 `symbol` varchar(255) DEFAULT NULL,
 `format` tinyint(1) DEFAULT NULL,
 `decimal_precision` int(10) unsigned DEFAULT '2',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `accounting_profile` --

CREATE TABLE `accounting_profile` (

 `accounting_id` int(10) unsigned NOT NULL DEFAULT '0',
 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`accounting_id`,`profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `activity_type` --

CREATE TABLE `activity_type` (

 `id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `name` varchar(255) DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `activated` tinyint(1) NOT NULL DEFAULT '1',
 `color` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight type';

-- -- Table structure for table `aircraft` --

CREATE TABLE `aircraft` (

 `id` int(10) unsigned NOT NULL DEFAULT '0',
 `ref_date` datetime DEFAULT NULL,
 `ref_hours` int(11) DEFAULT NULL,
 `inspection_date` datetime DEFAULT NULL,
 `inspection_time` int(11) DEFAULT NULL,
 `interval_visit` int(11) unsigned DEFAULT '30000',
 `time_alert1` int(11) DEFAULT '6000',
 `time_alert2` int(11) DEFAULT '0',
 `time_alert3` int(11) DEFAULT '-3000',
 `day_alert1` smallint(3) DEFAULT '15',
 `day_alert2` smallint(3) DEFAULT '0',
 `day_alert3` smallint(3) DEFAULT '-8',
 `last_counter` int(11) DEFAULT NULL,
 `tolerance_time` int(10) unsigned DEFAULT '6000',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='ALL AIRCRAFTS OF ALL AIRCLUBS';

-- -- Table structure for table `aircraft_type` --

CREATE TABLE `aircraft_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `flight_time_formula` varchar(255) DEFAULT '%DURATION',
 `counter_state` tinyint(2) NOT NULL DEFAULT '-1',
 `tolerance` int(11) DEFAULT '0',
 `autonomy` int(11) DEFAULT '5990',
 `true_air_speed` int(10) unsigned NOT NULL DEFAULT '0',
 `digit_counter_number` tinyint(1) unsigned NOT NULL DEFAULT '4',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of aircraft';

-- -- Table structure for table `aircraft_type_allowed_status` --

CREATE TABLE `aircraft_type_allowed_status` (

 `aircraft_type_id` int(10) unsigned DEFAULT NULL,
 `place_num` int(10) unsigned DEFAULT NULL,
 `status_id` int(10) unsigned DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of allowed functions for each aircraft type';

-- -- Table structure for table `aircraft_type_mandatory_flight_type` --

CREATE TABLE `aircraft_type_mandatory_flight_type` (

 `aircraft_type_id` int(10) unsigned DEFAULT NULL,
 `activity_type_id` bigint(20) unsigned DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of compulsory flight type for each aircraft type';

-- -- Table structure for table `aircraft_type_uncomp_flight_type` --

CREATE TABLE `aircraft_type_uncomp_flight_type` (

 `aircraft_type_id` int(10) unsigned DEFAULT NULL,
 `activity_type_id` bigint(20) unsigned DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of uncompatible flight type for each aircraft type';

-- -- Table structure for table `aircraft_type_validity_type` --

CREATE TABLE `aircraft_type_validity_type` (

 `aircraft_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 `validity_type_id` 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`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of qualif required for each aircraft type';

-- -- Table structure for table `balance` --

CREATE TABLE `balance` (

 `account_id` int(10) unsigned NOT NULL,
 `balance_date_id` int(10) unsigned NOT NULL,
 `debit` decimal(15,5) DEFAULT '0.00000',
 `credit` decimal(15,5) DEFAULT '0.00000',
 PRIMARY KEY (`account_id`,`balance_date_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of balance';

-- -- Table structure for table `balance_date` --

CREATE TABLE `balance_date` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `balance_date` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of balance date';

-- -- Table structure for table `booking` --

CREATE TABLE `booking` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `booking_group_id` int(10) unsigned DEFAULT NULL,
 `start_date` datetime DEFAULT NULL,
 `end_date` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='RECORDS ALL THE SLOTS OF ALL AIRCRAFTS OF ALL AIRCLUBS';

-- -- Table structure for table `booking_account_entry` --

CREATE TABLE `booking_account_entry` (

 `booking_id` int(10) unsigned NOT NULL DEFAULT '0',
 `account_entry_flow_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`booking_id`,`account_entry_flow_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `booking_activity_type` --

CREATE TABLE `booking_activity_type` (

 `booking_id` int(10) unsigned NOT NULL DEFAULT '0',
 `activity_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`booking_id`,`activity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `booking_changelog` --

CREATE TABLE `booking_changelog` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `booking_id` int(10) unsigned NOT NULL,
 `person_id` int(10) unsigned NOT NULL,
 `changelog_date` datetime NOT NULL,
 `booking_state` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `booking_person` --

CREATE TABLE `booking_person` (

 `booking_id` int(10) unsigned NOT NULL DEFAULT '0',
 `person_id` int(10) unsigned NOT NULL DEFAULT '0',
 `place_num` int(10) unsigned DEFAULT NULL,
 `status_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`booking_id`,`person_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `booking_resource` --

CREATE TABLE `booking_resource` (

 `booking_id` int(10) unsigned NOT NULL DEFAULT '0',
 `resource_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`booking_id`,`resource_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `budget` --

CREATE TABLE `budget` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `group_id` int(10) unsigned NOT NULL DEFAULT '0',
 `name` varchar(255) DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `export_code` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of budget';

-- -- Table structure for table `budget_group` --

CREATE TABLE `budget_group` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of budget group';

-- -- Table structure for table `business_field` --

CREATE TABLE `business_field` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `variable` varchar(255) DEFAULT NULL,
 `label` varchar(255) NOT NULL,
 `value_type` varchar(40) NOT NULL,
 `category` varchar(255) NOT NULL,
 `order_num` int(11) NOT NULL,
 `dsn` varchar(20) DEFAULT 'customer',
 `compulsory_fill` tinyint(1) DEFAULT '0',
 `linked_category` varchar(255) DEFAULT NULL,
 `linked_business_field_id` int(10) unsigned DEFAULT NULL,
 `linked_field_name` varchar(255) DEFAULT NULL,
 `max_display` int(10) DEFAULT '-1',
 `formula` text,
 `default_value` text,
 `placeholder` text,
 PRIMARY KEY (`id`),
 UNIQUE KEY `variable` (`variable`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of extra form field';

-- -- Table structure for table `business_field_activity_type` --

CREATE TABLE `business_field_activity_type` (

 `business_field_id` int(10) unsigned NOT NULL DEFAULT '0',
 `activity_type_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,
 PRIMARY KEY (`business_field_id`,`activity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `business_field_content` --

CREATE TABLE `business_field_content` (

 `category_id` int(10) unsigned NOT NULL,
 `business_field_id` int(10) unsigned NOT NULL DEFAULT '0',
 `person_id` int(10) unsigned NOT NULL DEFAULT '0',
 `content` text,
 `placeholder` text,
 PRIMARY KEY (`category_id`,`business_field_id`,`person_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Content of extra form field';

-- -- Table structure for table `business_field_group` --

CREATE TABLE `business_field_group` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `label` varchar(255) DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `criteria` --

CREATE TABLE `criteria` (

 `id` int(11) NOT NULL AUTO_INCREMENT,
 `label` varchar(255) NOT NULL,
 `predicate` text NOT NULL,
 `order_num` int(11) DEFAULT NULL,
 `dsn` varchar(20) DEFAULT 'customer',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of criteria';

-- -- Table structure for table `criteria_profile` --

CREATE TABLE `criteria_profile` (

 `criteria_id` int(10) unsigned NOT NULL,
 `profile_id` bigint(20) unsigned NOT NULL,
 PRIMARY KEY (`criteria_id`,`profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `customer_bill_entry` --

CREATE TABLE `customer_bill_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,
 `customer_bill_id` int(10) unsigned DEFAULT NULL,
 `product_id` int(10) unsigned DEFAULT NULL,
 `qty` decimal(15,2) DEFAULT '0.00',
 `unit_price` decimal(15,5) DEFAULT '0.00000',
 `debit` decimal(15,5) DEFAULT '0.00000',
 `credit` decimal(15,5) DEFAULT '0.00000',
 `bill_date` datetime 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_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 COMMENT='List of customer bill stored file';

-- -- Table structure for table `default_display` --

CREATE TABLE `default_display` (

 `person_id` int(10) unsigned NOT NULL,
 `display_key` varchar(255) NOT NULL DEFAULT ,
 `display_value` text,
 PRIMARY KEY (`person_id`,`display_key`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of default display parameters';

-- -- Table structure for table `default_multi_display` --

CREATE TABLE `default_multi_display` (

 `resource_type` char(30) NOT NULL,
 `person_id` int(10) unsigned NOT NULL,
 `resource_id` int(10) unsigned NOT NULL,
 `display_value` text,
 PRIMARY KEY (`resource_type`,`person_id`,`resource_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of default multi display parameters';

-- -- Table structure for table `email_sent` --

CREATE TABLE `email_sent` (

 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 `message_id` varchar(150) NOT NULL,
 `sender` varchar(255) NOT NULL,
 `title` varchar(255) NOT NULL,
 `category` tinyint(3) unsigned NOT NULL,
 `category_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`id`),
 UNIQUE KEY `message_id_UNIQUE` (`message_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `email_sent_recipient` --

CREATE TABLE `email_sent_recipient` (

 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 `email_sent_id` bigint(20) unsigned NOT NULL,
 `person_id` int(10) unsigned NOT NULL,
 `email` varchar(255) DEFAULT NULL,
 `recipient_type` tinyint(3) unsigned DEFAULT NULL,
 `smtp_status_category` varchar(30) DEFAULT NULL,
 `email_status` tinyint(3) unsigned DEFAULT NULL,
 `update_date` datetime NOT NULL,
 PRIMARY KEY (`id`),
 KEY `email_sent_id_idx` (`email_sent_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `exceptionnal_inst_date` --

CREATE TABLE `exceptionnal_inst_date` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `person_id` int(10) unsigned DEFAULT NULL,
 `start_date` datetime DEFAULT NULL,
 `end_date` datetime DEFAULT NULL,
 `presence` tinyint(1) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `extra_field_profile` --

CREATE TABLE `extra_field_profile` (

 `business_field_id` int(10) unsigned NOT NULL DEFAULT '0',
 `booking_popup_display_4_profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`business_field_id`,`booking_popup_display_4_profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Linked extra field and profile';

-- -- Table structure for table `facebook` --

CREATE TABLE `facebook` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `category` int(10) unsigned NOT NULL,
 `owner_id` int(10) unsigned NOT NULL,
 `small` blob,
 `original` mediumblob NOT NULL,
 `label` text,
 `description` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of user picture';

-- -- Table structure for table `favorite_icao` --

CREATE TABLE `favorite_icao` (

 `icao` varchar(6) NOT NULL,
 PRIMARY KEY (`icao`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='favorite airfield list';

-- -- Table structure for table `favorite_report` --

CREATE TABLE `favorite_report` (

 `report_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`report_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `favorite_report_profile` --

CREATE TABLE `favorite_report_profile` (

 `report_id` int(10) unsigned NOT NULL,
 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`report_id`,`profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `fhp_aircraft_type` --

CREATE TABLE `fhp_aircraft_type` (

 `fhp_id` int(10) NOT NULL DEFAULT '0',
 `aircraft_type_id` int(10) NOT NULL DEFAULT '0',
 PRIMARY KEY (`fhp_id`,`aircraft_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='flight hour pricing aircraft type list';

-- -- Table structure for table `fhp_flight_type` --

CREATE TABLE `fhp_flight_type` (

 `fhp_id` int(10) NOT NULL DEFAULT '0',
 `activity_type_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `excluded` tinyint(1) unsigned DEFAULT '0',
 PRIMARY KEY (`fhp_id`,`activity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='flight hour pricing flight type list';

-- -- Table structure for table `fhp_profile` --

CREATE TABLE `fhp_profile` (

 `fhp_id` int(10) unsigned NOT NULL,
 `profile_id` bigint(20) unsigned NOT NULL,
 `place_num` tinyint(1) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`fhp_id`,`profile_id`,`place_num`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `file` --

CREATE TABLE `file` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `content` mediumblob,
 `file_type` varchar(255) DEFAULT NULL,
 `category` tinyint(1) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stored file';

-- -- Table structure for table `flight` --

CREATE TABLE `flight` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `aircraft_id` int(10) unsigned DEFAULT NULL,
 `start_date` datetime DEFAULT NULL,
 `duration` int(11) DEFAULT NULL,
 `activity_type_id` bigint(20) unsigned DEFAULT NULL,
 `people_onboard` int(10) unsigned DEFAULT NULL,
 `departure_location_id` int(10) unsigned DEFAULT NULL,
 `arrival_location_id` int(10) unsigned DEFAULT NULL,
 `counter_departure` int(10) unsigned DEFAULT NULL,
 `counter_arrival` int(10) unsigned DEFAULT NULL,
 `landing_number` int(10) unsigned DEFAULT NULL,
 `airborne` tinyint(1) unsigned DEFAULT NULL,
 `validated` tinyint(3) unsigned DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight';

-- -- Table structure for table `flight_account_entry` --

CREATE TABLE `flight_account_entry` (

 `flight_id` int(10) unsigned NOT NULL DEFAULT '0',
 `account_entry_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`flight_id`,`account_entry_id`),
 KEY `idx_account_entry_id` (`account_entry_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='flight account entry join';

-- -- Table structure for table `flight_hours_pricing` --

CREATE TABLE `flight_hours_pricing` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` text,
 `price_formula` text,
 `left_account_id` int(10) unsigned DEFAULT NULL,
 `right_account_id` int(10) unsigned DEFAULT NULL,
 `left_account_type` tinyint(1) unsigned DEFAULT '0',
 `right_account_type` tinyint(1) unsigned DEFAULT '0',
 `credit_budget_id` int(10) unsigned DEFAULT NULL,
 `debit_budget_id` int(10) unsigned DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `product_id` int(10) unsigned DEFAULT NULL,
 `sale_trigger_id` int(10) unsigned DEFAULT '0',
 `query` text,
 `variable_formula` text,
 `business_field_id` int(10) unsigned DEFAULT NULL,
 `debit_bill_num` int(10) unsigned DEFAULT NULL,
 `credit_bill_num` int(10) unsigned DEFAULT NULL,
 `qty_formula` text,
 `unit_price_formula` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of flight hours pricing formula';

-- -- Table structure for table `flight_pilot` --

CREATE TABLE `flight_pilot` (

 `flight_id` int(10) unsigned NOT NULL,
 `pilot_id` int(10) unsigned NOT NULL,
 `status_id` int(10) unsigned DEFAULT NULL,
 `num` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`flight_id`,`pilot_id`,`num`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of crew for each flight';

-- -- Table structure for table `flight_tank_qty` --

CREATE TABLE `flight_tank_qty` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `flight_id` int(10) unsigned NOT NULL,
 `tank_id` int(10) unsigned NOT NULL,
 `quantity` varchar(255) NOT NULL DEFAULT '0.00',
 `after_flight` tinyint(1) NOT NULL DEFAULT '0',
 `account_id` int(10) unsigned DEFAULT NULL,
 `pay_type` tinyint(1) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of flight tank quantities';

-- -- Table structure for table `flight_track` --

CREATE TABLE `flight_track` (

 `flight_id` int(10) unsigned NOT NULL,
 `track_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`track_id`,`flight_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Link between flight and track';

-- -- Table structure for table `flight_type_mandatory_validity_type` --

CREATE TABLE `flight_type_mandatory_validity_type` (

 `activity_type_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `validity_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`activity_type_id`,`validity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of mandatory qualification for each flight type';

-- -- Table structure for table `import` --

CREATE TABLE `import` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `label` varchar(255) NOT NULL,
 `order_num` int(11) DEFAULT NULL,
 `import_file_type` varchar(255) NOT NULL DEFAULT 'csv-comma-CRLF',
 `match_query` text,
 `uptodate_test_query` text,
 `update_query` text,
 `update_activated` tinyint(1) NOT NULL DEFAULT '0',
 `login` varchar(255) DEFAULT NULL,
 `hash_password` varchar(255) DEFAULT NULL,
 `sync_task_name` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of import';

-- -- Table structure for table `ip_stopped` --

CREATE TABLE `ip_stopped` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `ip` varchar(255) NOT NULL,
 `counter` tinyint(1) unsigned NOT NULL,
 `expire_date` datetime NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='BLACKLISTED IP';

-- -- Table structure for table `journal` --

CREATE TABLE `journal` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `login` varchar(255) DEFAULT NULL,
 `date_log` datetime DEFAULT NULL,
 `rights` text,
 `rights2` text,
 `action` varchar(255) DEFAULT NULL,
 `person_id` int(10) unsigned DEFAULT '0',
 PRIMARY KEY (`id`),
 KEY `idx_date_log` (`date_log`),
 KEY `idx_action` (`action`(8))

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of logs';

-- -- Table structure for table `key_alert` --

CREATE TABLE `key_alert` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `alert_date` datetime DEFAULT NULL,
 `status` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Key alerts';

-- -- Table structure for table `key_assignment` --

CREATE TABLE `key_assignment` (

 `key_id` tinyint(2) unsigned NOT NULL DEFAULT '0',
 `key_name` tinytext,
 `aircraft_id` int(10) unsigned DEFAULT '0',
 `key_state` tinyint(1) unsigned DEFAULT '0',
 `key_word` bigint(20) unsigned DEFAULT '0',
 PRIMARY KEY (`key_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='key assignment description';

-- -- Table structure for table `key_host` --

CREATE TABLE `key_host` (

 `id` tinyint(2) NOT NULL AUTO_INCREMENT,
 `timeout` tinyint(2) NOT NULL DEFAULT '10',
 `num_key` tinyint(2) unsigned NOT NULL DEFAULT '10',
 `ipkey` varchar(50) NOT NULL DEFAULT '127.0.0.1',
 `httpport` int(11) NOT NULL DEFAULT '4080',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='key host configuration';

-- -- Table structure for table `key_log` --

CREATE TABLE `key_log` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `log_date` datetime DEFAULT NULL,
 `action` varchar(255) DEFAULT NULL,
 `message` varchar(255) DEFAULT NULL,
 `key_id` int(10) unsigned DEFAULT NULL,
 `person_id` int(10) unsigned DEFAULT NULL,
 `xmlrpc` int(10) unsigned NOT NULL,
 `error` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Key logs';

-- -- Table structure for table `location` --

CREATE TABLE `location` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(64) NOT NULL,
 `icao_name` varchar(6) DEFAULT NULL,
 `latitude` double DEFAULT NULL,
 `longitude` double DEFAULT NULL,
 `altitude` int(7) DEFAULT NULL,
 `weather_station` int(1) unsigned DEFAULT NULL,
 `asked_counter` bigint(20) NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 UNIQUE KEY `icao_name` (`icao_name`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='airfields coord';

-- -- Table structure for table `log` --

CREATE TABLE `log` (

 `journal_id` int(10) unsigned NOT NULL,
 `action` varchar(255) DEFAULT NULL,
 `table_name` varchar(255) DEFAULT NULL,
 `field_name` varchar(255) DEFAULT NULL,
 `field_value` varchar(255) DEFAULT NULL,
 KEY `idx_journal_id` (`journal_id`),
 KEY `idx_field_value` (`field_value`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='part of logs';

-- -- Table structure for table `logger` --

CREATE TABLE `logger` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `serial_number` int(10) unsigned DEFAULT NULL,
 `color` varchar(20) NOT NULL DEFAULT 'red',
 `activated` tinyint(1) unsigned NOT NULL DEFAULT '1',
 `order_num` int(10) unsigned NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Logger parameters';

-- -- Table structure for table `login_stopped` --

CREATE TABLE `login_stopped` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `login` varchar(255) NOT NULL,
 `counter` tinyint(3) unsigned NOT NULL,
 `expire_date` datetime NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='BLACKLISTED LOGIN';

-- -- Table structure for table `m_component` --

CREATE TABLE `m_component` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `parent_id` int(10) unsigned NOT NULL DEFAULT '0',
 `m_component_type_id` int(10) unsigned DEFAULT NULL,
 `resource_id` int(10) unsigned DEFAULT NULL,
 `order_num` int(11) NOT NULL,
 `serial_number` varchar(255) DEFAULT NULL,
 `brandnew_date` datetime DEFAULT NULL,
 `activated` tinyint(1) unsigned NOT NULL DEFAULT '1',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `m_component_type` --

CREATE TABLE `m_component_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `parent_id` int(10) unsigned NOT NULL DEFAULT '0',
 `resource_type_id` int(11) DEFAULT NULL,
 `m_classification_id` int(11) DEFAULT NULL,
 `is_maintenance_check` tinyint(1) unsigned NOT NULL DEFAULT '1',
 `order_num` int(11) NOT NULL,
 `label` varchar(255) DEFAULT NULL,
 `description` varchar(255) DEFAULT NULL,
 `manufacturer` varchar(255) DEFAULT NULL,
 `manufacturer_reference` varchar(255) DEFAULT NULL,
 `part_number` varchar(255) DEFAULT NULL,
 `periodicity` int(10) unsigned DEFAULT NULL,
 `tolerance` int(10) unsigned NOT NULL DEFAULT '0',
 `calendar_periodicity` int(10) unsigned DEFAULT NULL,
 `calendar_tolerance` int(10) unsigned NOT NULL DEFAULT '0',
 `activated` tinyint(1) unsigned NOT NULL DEFAULT '1',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `m_component_type_parentality` --

CREATE TABLE `m_component_type_parentality` (

 `m_component_type_id` int(10) unsigned NOT NULL,
 `m_component_type_parent_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`m_component_type_id`,`m_component_type_parent_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `m_history` --

CREATE TABLE `m_history` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `m_component_id` int(10) unsigned NOT NULL,
 `install_date` datetime DEFAULT NULL,
 `remove_date` datetime DEFAULT NULL,
 `total_hours_on_install` int(10) unsigned NOT NULL DEFAULT '0',
 `threshold_hours` int(10) unsigned NOT NULL DEFAULT '0',
 `threshold_date` datetime DEFAULT NULL,
 `threshold_date_locked` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `threshold_hours_locked` tinyint(1) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `m_operation` --

CREATE TABLE `m_operation` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `content` text,
 `m_component_type_id` int(10) unsigned NOT NULL,
 `order_num` int(11) NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `map_logger_monitoring` --

CREATE TABLE `map_logger_monitoring` (

 `record_id` int(10) unsigned NOT NULL,
 `count_data` int(10) unsigned NOT NULL,
 PRIMARY KEY (`record_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Link between flight and track';

-- -- Table structure for table `map_track` --

CREATE TABLE `map_track` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `record_id` int(10) unsigned DEFAULT NULL,
 `start_data` int(10) unsigned DEFAULT NULL,
 `number` int(10) unsigned DEFAULT NULL,
 `start_time` datetime DEFAULT NULL,
 `latitude_max` double DEFAULT NULL,
 `longitude_max` double DEFAULT NULL,
 `latitude_min` double DEFAULT NULL,
 `longitude_min` double DEFAULT NULL,
 `visible` tinyint(1) unsigned NOT NULL DEFAULT '1',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Tracks split from GDR';

-- -- Table structure for table `nationality` --

CREATE TABLE `nationality` (

 `code` char(2) NOT NULL,
 `label` varchar(255) NOT NULL,
 PRIMARY KEY (`code`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of nationalities';

-- -- Table structure for table `parameter` --

CREATE TABLE `parameter` (

 `code` varchar(255) NOT NULL,
 `key_id` int(10) unsigned NOT NULL DEFAULT '0',
 `enabled` tinyint(1) unsigned DEFAULT '0',
 `int_value` int(10) unsigned DEFAULT '0',
 `char_value` text,
 PRIMARY KEY (`code`,`key_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='APPLICATION PARAMETERS';

-- -- Table structure for table `payment_distribution` --

CREATE TABLE `payment_distribution` (

 `payment_id` int(10) unsigned NOT NULL DEFAULT '0',
 `account_club_id` int(10) unsigned DEFAULT NULL,
 `person_delivery` tinyint(1) unsigned DEFAULT '0',
 `member_budget_id` int(10) unsigned DEFAULT NULL,
 `treasury_budget_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`payment_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='payment distribution description';

-- -- Table structure for table `payment_summary_file` --

CREATE TABLE `payment_summary_file` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `file_type` varchar(255) DEFAULT NULL,
 `content` longblob,
 `record_date` datetime DEFAULT NULL,
 `total_entry` int(10) unsigned DEFAULT NULL,
 `total_amount` decimal(15,5) unsigned DEFAULT NULL,
 `payment_type_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `payment_type` --

CREATE TABLE `payment_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` text,
 `text_field_label` text,
 `only_admin` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `order_num` int(11) DEFAULT NULL,
 `pos_key_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='type of payment description';

-- -- Table structure for table `person` --

CREATE TABLE `person` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) NOT NULL,
 `hash_password` varchar(255) NOT NULL,
 `first_name` varchar(255) DEFAULT NULL,
 `last_name` varchar(255) DEFAULT NULL,
 `profile` bigint(20) unsigned NOT NULL DEFAULT '0',
 `view_type` int(10) unsigned DEFAULT NULL,
 `view_width` tinyint(3) unsigned NOT NULL DEFAULT '12',
 `view_height` tinyint(4) unsigned NOT NULL DEFAULT '30',
 `email` varchar(255) DEFAULT NULL,
 `timezone` varchar(255) DEFAULT NULL,
 `address` varchar(255) DEFAULT NULL,
 `zipcode` varchar(255) DEFAULT NULL,
 `city` varchar(255) DEFAULT NULL,
 `state` varchar(255) DEFAULT NULL,
 `country` varchar(255) DEFAULT NULL,
 `home_phone` varchar(255) DEFAULT NULL,
 `work_phone` varchar(255) DEFAULT NULL,
 `cell_phone` varchar(255) DEFAULT NULL,
 `lang` varchar(255) DEFAULT NULL,
 `notification` tinyint(3) unsigned DEFAULT NULL,
 `activated` tinyint(1) unsigned DEFAULT '1',
 `birthdate` datetime DEFAULT '0000-00-00 00:00:00',
 `sex` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `nationality` char(2) DEFAULT NULL,
 `total_flight_time` int(10) unsigned DEFAULT '0',
 `date_total_flight_time` datetime DEFAULT NULL,
 `guid` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`id`),
 UNIQUE KEY `idx_name` (`name`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='used for authentication';

-- -- Table structure for table `person_awaiting_activation` --

CREATE TABLE `person_awaiting_activation` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `login` varchar(255) NOT NULL,
 `ip` varchar(255) NOT NULL,
 `code` varchar(255) NOT NULL,
 `category` varchar(255) NOT NULL,
 `expiration_date` datetime DEFAULT NULL,
 `used` tinyint(1) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='member_awaiting_activation';

-- -- Table structure for table `product` --

CREATE TABLE `product` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `label` varchar(255) NOT NULL,
 `unit` varchar(255) NOT NULL,
 `free_sale` tinyint(1) NOT NULL DEFAULT '0',
 `locked` tinyint(1) unsigned DEFAULT '0',
 `variable_id` int(10) unsigned DEFAULT NULL,
 `sale_type` tinyint(1) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of sale type';

-- -- Table structure for table `profile` --

CREATE TABLE `profile` (

 `id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `name` varchar(255) DEFAULT NULL,
 `permits` int(10) unsigned DEFAULT NULL,
 `permits2` int(10) unsigned NOT NULL DEFAULT '0',
 `permits3` int(10) unsigned NOT NULL DEFAULT '0',
 `pictogram` int(10) unsigned DEFAULT NULL,
 `default_status_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_accounting_notification` --

CREATE TABLE `profile_accounting_notification` (

 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `accounting_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`profile_id`,`accounting_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_extra_field_join` --

CREATE TABLE `profile_extra_field_join` (

 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `business_field_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`profile_id`,`business_field_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_profile_view` --

CREATE TABLE `profile_profile_view` (

 `profile_id` bigint(20) unsigned NOT NULL,
 `viewable_profile_id` bigint(20) unsigned NOT NULL,
 PRIMARY KEY (`profile_id`,`viewable_profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_required_account_type` --

CREATE TABLE `profile_required_account_type` (

 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `account_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`profile_id`,`account_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_resource_type_place` --

CREATE TABLE `profile_resource_type_place` (

 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `resource_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 `place_num` int(10) unsigned NOT NULL,
 PRIMARY KEY (`profile_id`,`resource_type_id`,`place_num`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_resource_type_view` --

CREATE TABLE `profile_resource_type_view` (

 `profile_id` bigint(20) unsigned NOT NULL,
 `viewable_resource_type_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`profile_id`,`viewable_resource_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_validity_type_join` --

CREATE TABLE `profile_validity_type_join` (

 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `validity_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`profile_id`,`validity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `profile_validity_type_notification` --

CREATE TABLE `profile_validity_type_notification` (

 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 `validity_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`profile_id`,`validity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `psp_return` --

CREATE TABLE `psp_return` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `psp_transaction_id` int(10) unsigned DEFAULT NULL,
 `bank_answer` text,
 `bank_misc` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `psp_transaction` --

CREATE TABLE `psp_transaction` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `credit_account_id` int(10) unsigned NOT NULL,
 `debit_account_id` int(10) unsigned NOT NULL,
 `transaction_date` datetime NOT NULL,
 `amount` float NOT NULL,
 `description` varchar(255) DEFAULT NULL,
 `payment_type_id` int(10) unsigned NOT NULL,
 `state` int(10) unsigned NOT NULL DEFAULT '0',
 `token` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of waiting cash transactions';

-- -- Table structure for table `psp_transaction_account_entry` --

CREATE TABLE `psp_transaction_account_entry` (

 `psp_transaction_id` int(10) unsigned NOT NULL DEFAULT '0',
 `account_entry_flow_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`psp_transaction_id`,`account_entry_flow_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `regular_presence_inst_date` --

CREATE TABLE `regular_presence_inst_date` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `person_id` int(10) unsigned DEFAULT NULL,
 `start_day` tinyint(3) unsigned DEFAULT NULL,
 `end_day` tinyint(3) unsigned DEFAULT NULL,
 `start_hour` time DEFAULT NULL,
 `end_hour` time DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `resource` --

CREATE TABLE `resource` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `resource_type_id` int(10) unsigned DEFAULT NULL,
 `comments` varchar(255) DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `activated` tinyint(1) unsigned NOT NULL DEFAULT '1',
 `bookable` int(10) unsigned DEFAULT '1',
 `physical` int(10) unsigned DEFAULT '1',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of resource';

-- -- Table structure for table `resource_exceptional_availability` --

CREATE TABLE `resource_exceptional_availability` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `resource_id` int(10) unsigned DEFAULT NULL,
 `start_date` datetime DEFAULT NULL,
 `end_date` datetime DEFAULT NULL,
 `presence` tinyint(1) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `resource_regular_availability` --

CREATE TABLE `resource_regular_availability` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `resource_id` int(10) unsigned DEFAULT NULL,
 `start_day` tinyint(1) unsigned DEFAULT NULL,
 `end_day` tinyint(1) unsigned DEFAULT NULL,
 `start_hour` time DEFAULT NULL,
 `end_hour` time DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `resource_type` --

CREATE TABLE `resource_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `category` int(10) unsigned DEFAULT NULL,
 `seats_available` int(11) DEFAULT '-1',
 `comments` varchar(255) DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `activated` tinyint(1) unsigned NOT NULL DEFAULT '1',
 `max_booking_duration` int(10) DEFAULT '-1',
 `pictogram` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of resource type';

-- -- Table structure for table `resource_type_place_tag` --

CREATE TABLE `resource_type_place_tag` (

 `resource_type_id` int(10) unsigned NOT NULL DEFAULT '0',
 `place_num` tinyint(1) unsigned NOT NULL,
 `place_tag` varchar(255) DEFAULT NULL,
 `place_quantity` int(10) DEFAULT '-1',
 PRIMARY KEY (`resource_type_id`,`place_num`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `sale_2_stock` --

CREATE TABLE `sale_2_stock` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `product_id` int(10) unsigned DEFAULT NULL,
 `stock_id` int(10) unsigned NOT NULL,
 `stock_variation_qty_per_sale` float NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock put into sale';

-- -- Table structure for table `sale_2_validity_type` --

CREATE TABLE `sale_2_validity_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `validity_type_id` int(10) unsigned NOT NULL,
 `new_formula` varchar(255) DEFAULT NULL,
 `update_formula` varchar(255) DEFAULT NULL,
 `product_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`),
 UNIQUE KEY `validity_type_id` (`validity_type_id`),
 KEY `idx_product` (`product_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of validity type into sale';

-- -- Table structure for table `sale_pricing` --

CREATE TABLE `sale_pricing` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `price_formula` text,
 `debit_account_id` int(10) unsigned DEFAULT NULL,
 `credit_account_id` int(10) unsigned DEFAULT NULL,
 `debit_account_type` tinyint(1) unsigned DEFAULT '0',
 `credit_account_type` tinyint(1) unsigned DEFAULT '0',
 `credit_budget_id` int(10) unsigned DEFAULT NULL,
 `debit_budget_id` int(10) unsigned DEFAULT NULL,
 `order_num` int(11) DEFAULT NULL,
 `label` varchar(255) DEFAULT NULL,
 `variable_formula` varchar(255) DEFAULT NULL,
 `debit_bill_num` int(10) unsigned DEFAULT NULL,
 `credit_bill_num` int(10) unsigned DEFAULT NULL,
 `qty_formula` text,
 `unit_price_formula` text,
 `added_product_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of sale pricing formula';

-- -- Table structure for table `sale_pricing_product` --

CREATE TABLE `sale_pricing_product` (

 `sale_pricing_id` int(10) unsigned NOT NULL DEFAULT '0',
 `product_id` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`sale_pricing_id`,`product_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `sale_pricing_profile` --

CREATE TABLE `sale_pricing_profile` (

 `sale_pricing_id` int(10) unsigned NOT NULL,
 `profile_id` bigint(20) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`sale_pricing_id`,`profile_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `sale_trigger` --

CREATE TABLE `sale_trigger` (

 `id` int(10) NOT NULL AUTO_INCREMENT,
 `name` varchar(255) DEFAULT NULL,
 `event` varchar(255) DEFAULT NULL,
 `locked` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `query` text,
 `validate_entry` tinyint(1) DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of sale trigger';

-- -- Table structure for table `spreadsheet_parameter` --

CREATE TABLE `spreadsheet_parameter` (

 `file_number` int(10) NOT NULL,
 `spreadsheet_key` varchar(255) NOT NULL,
 `spreadsheet_value` varchar(255) NOT NULL,
 `file_name` varchar(255) DEFAULT NULL,
 `google_url` varchar(255) NOT NULL,
 `file_type` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`file_number`,`spreadsheet_key`,`spreadsheet_value`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `statistic` --

CREATE TABLE `statistic` (

 `name` varchar(255) NOT NULL,
 `of_version` tinyint(3) NOT NULL DEFAULT '0',
 `value` decimal(15,2) NOT NULL DEFAULT '0.00',
 PRIMARY KEY (`name`,`of_version`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `status` --

CREATE TABLE `status` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `abbrev` varchar(255) DEFAULT NULL,
 `name` varchar(255) DEFAULT NULL,
 `pictogram` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of functions for pilot';

-- -- Table structure for table `stock` --

CREATE TABLE `stock` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `label` varchar(255) NOT NULL,
 `stock_type_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock';

-- -- Table structure for table `stock_level` --

CREATE TABLE `stock_level` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `stock_id` int(10) unsigned NOT NULL,
 `qty` float NOT NULL DEFAULT '0',
 `stock_date` datetime DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock level';

-- -- Table structure for table `stock_type` --

CREATE TABLE `stock_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `label` varchar(255) NOT NULL,
 `unit` varchar(255) NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock type';

-- -- Table structure for table `stock_variation` --

CREATE TABLE `stock_variation` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `stock_id` int(10) unsigned NOT NULL,
 `qty` float NOT NULL DEFAULT '0',
 `variation_date` datetime DEFAULT NULL,
 `validated` tinyint(1) unsigned DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock variation';

-- -- Table structure for table `stock_variation_account_entry` --

CREATE TABLE `stock_variation_account_entry` (

 `product_id` int(10) unsigned NOT NULL DEFAULT '0',
 `stock_variation_id` int(10) unsigned NOT NULL,
 `account_entry_flow_id` int(10) unsigned NOT NULL,
 `person_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`product_id`,`stock_variation_id`,`account_entry_flow_id`),
 KEY `idx_account_entry_flow_id` (`account_entry_flow_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of stock variation account entry';

-- -- Table structure for table `structure` --

CREATE TABLE `structure` (

 `id` int(10) NOT NULL DEFAULT '0',
 `name` varchar(255) DEFAULT NULL,
 `info_cell` text,
 `logo` longblob,
 `logo_name` varchar(255) DEFAULT NULL,
 `logo_ext` varchar(25) DEFAULT NULL,
 `logo_size` int(11) DEFAULT NULL,
 `first_hour_displayed` time DEFAULT NULL,
 `last_hour_displayed` time DEFAULT NULL,
 `usual_profiles` bigint(20) unsigned NOT NULL DEFAULT '0',
 `icao` varchar(6) DEFAULT NULL,
 `default_slot_range` int(10) unsigned DEFAULT NULL,
 `min_slot_range` tinyint(3) unsigned DEFAULT NULL,
 `twilight_range` tinyint(3) unsigned DEFAULT NULL,
 `mailing_list_name` varchar(255) DEFAULT NULL,
 `mailing_list_type` varchar(255) DEFAULT NULL,
 `structure_site_url` varchar(255) DEFAULT NULL,
 `default_timezone` varchar(255) NOT NULL,
 `lang` varchar(255) NOT NULL,
 `admin_num` int(10) unsigned NOT NULL,
 `default_view_type` int(10) unsigned DEFAULT NULL,
 `address` varchar(255) DEFAULT NULL,
 `zipcode` varchar(255) DEFAULT NULL,
 `city` varchar(255) DEFAULT NULL,
 `state` varchar(255) DEFAULT NULL,
 `country` varchar(255) DEFAULT NULL,
 `phone` varchar(255) DEFAULT NULL,
 `fax` varchar(255) DEFAULT NULL,
 `email` varchar(255) DEFAULT NULL,
 `default_notification` int(3) unsigned DEFAULT NULL,
 `welcome_cell` text,
 `business` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='DESCRIPTION OF ALL AIRCLUBS';

-- -- Table structure for table `supplier_bill` --

CREATE TABLE `supplier_bill` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `supplier_bill_type_id` int(10) unsigned NOT NULL,
 `bill_date` date DEFAULT NULL,
 `description` varchar(255) DEFAULT NULL,
 `ordinal` int(10) unsigned NOT NULL,
 `validated` tinyint(1) DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of supplier bill';

-- -- Table structure for table `supplier_bill_account_entry` --

CREATE TABLE `supplier_bill_account_entry` (

 `supplier_bill_id` int(10) unsigned NOT NULL,
 `account_entry_flow_id` int(10) unsigned NOT NULL,
 PRIMARY KEY (`supplier_bill_id`,`account_entry_flow_id`),
 KEY `idx_account_entry_flow_id` (`account_entry_flow_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='list of account entry for each supplier bill';

-- -- Table structure for table `supplier_bill_type` --

CREATE TABLE `supplier_bill_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `supplier_account_id` int(10) unsigned NOT NULL,
 `name` varchar(255) DEFAULT NULL,
 `account_id` int(10) unsigned NOT NULL,
 `vat_account_id` int(10) unsigned DEFAULT NULL,
 `supplier_budget_id` int(10) unsigned DEFAULT NULL,
 `account_budget_id` int(10) unsigned DEFAULT NULL,
 `vat_budget_id` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of supplier bill type';

-- -- Table structure for table `table_trigger` --

CREATE TABLE `table_trigger` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `monitored_table` varchar(255) NOT NULL,
 `trigger_formula` varchar(255) NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `tank` --

CREATE TABLE `tank` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `aircraft_type_id` int(10) unsigned NOT NULL,
 `tank_type_id` int(10) unsigned NOT NULL,
 `unit_id` int(10) unsigned NOT NULL,
 `label` varchar(255) NOT NULL,
 `max_quantity` decimal(15,2) NOT NULL DEFAULT '-1.00',
 `unlimited_quantity` int(10) unsigned DEFAULT '1',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of tanks';

-- -- Table structure for table `track_record` --

CREATE TABLE `track_record` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `in_progress` tinyint(1) unsigned DEFAULT NULL,
 `start_date` datetime DEFAULT '0000-00-00 00:00:00',
 `activated` tinyint(1) unsigned DEFAULT NULL,
 `datechsys_track_id` int(10) unsigned DEFAULT NULL,
 `resource_cat` int(10) unsigned NOT NULL,
 `resource_id` int(10) unsigned NOT NULL,
 `additional_information` int(10) unsigned DEFAULT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of flight record';

-- -- Table structure for table `track_record_data` --

CREATE TABLE `track_record_data` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `record_id` int(10) unsigned NOT NULL,
 `record_date` datetime DEFAULT NULL,
 `longitude` double DEFAULT NULL,
 `latitude` double DEFAULT NULL,
 `altitude` int(7) DEFAULT NULL,
 `speed` double DEFAULT NULL,
 `track` int(3) unsigned DEFAULT NULL,
 `acc_x` int(6) DEFAULT NULL,
 `acc_y` int(6) DEFAULT NULL,
 `acc_z` int(6) DEFAULT NULL,
 `pressure` int(5) unsigned DEFAULT NULL,
 `battery_level` int(4) unsigned DEFAULT NULL,
 `gps_fix` tinyint(1) unsigned DEFAULT NULL,
 `receive_date` datetime DEFAULT NULL,
 PRIMARY KEY (`id`),
 KEY `idx_record_id` (`record_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of flight record data';

-- -- Table structure for table `track_resource` --

CREATE TABLE `track_resource` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Table structure for table `uncomp_flight_type` --

CREATE TABLE `uncomp_flight_type` (

 `id1` int(10) unsigned DEFAULT NULL,
 `id2` int(10) unsigned DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of sales';

-- -- Table structure for table `validity` --

CREATE TABLE `validity` (

 `person_id` int(10) unsigned NOT NULL,
 `validity_type_id` int(10) unsigned NOT NULL,
 `expire_date` date DEFAULT NULL,
 `no_alert` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `ident_value` varchar(255) DEFAULT NULL,
 `grant_date` date DEFAULT NULL,
 PRIMARY KEY (`person_id`,`validity_type_id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='QUALIFICATIONS OF EACH MEMBER';

-- -- Table structure for table `validity_type` --

CREATE TABLE `validity_type` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(255) NOT NULL,
 `time_limitation` tinyint(1) NOT NULL DEFAULT '0',
 `ident_value_enable` tinyint(1) NOT NULL DEFAULT '0',
 `grant_date_enable` tinyint(1) NOT NULL DEFAULT '0',
 `mandatory` tinyint(1) NOT NULL DEFAULT '0',
 `experience_formula` text,
 `alert_on_login` int(10) DEFAULT '-2',
 `mandatory_access_control` tinyint(1) unsigned DEFAULT '0',
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='QUALIFICATIONS LIST';

-- -- Table structure for table `variable` --

CREATE TABLE `variable` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `variable` varchar(255) NOT NULL,
 `label` varchar(255) NOT NULL,
 `category` tinyint(1) DEFAULT NULL,
 `value_type` varchar(255) DEFAULT NULL,
 `order_num` int(11) NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='pricing_variable';

-- -- Table structure for table `variable_value` --

CREATE TABLE `variable_value` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `variable_id` int(11) NOT NULL,
 `assign_value` decimal(15,2) NOT NULL,
 `start_date` datetime NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='pricing_value';

-- -- Table structure for table `web_feed` --

CREATE TABLE `web_feed` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `channel_id` int(10) unsigned NOT NULL,
 `publication_date` datetime NOT NULL,
 `title` varchar(255) DEFAULT NULL,
 `content` text,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of web feed';

-- -- Table structure for table `web_feed_channel` --

CREATE TABLE `web_feed_channel` (

 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `label` varchar(255) NOT NULL,
 PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of web feed channel';</sql>

Description

Table booking

Le contenu du champ aircraft_id de la table booking peut être nul. Dans ce cas, c'est une ancienne réservation effectuée sur une ressource non-existante ou qui n'existe plus; aussi nommé réservation orpheline.

Table flight

  • airborne :
    • 0: Pas en l'air ou fermeture de vol : Le pilote a terminé le vol.
    • 1: En l'air ou ouverture de vol : Le pilote remplit le vol avant de voler.

Champs cachés

Les champs suivants ne peuvent être exportés and ne doivent pas être inclus dans une requête SELECT. De plus, un "SELECT *" n'est possivle quand une des tables contient un champ caché :

  • Table structure :
    • name
    • info_cell
    • logo
    • logo_name
    • logo_ext
    • logo_size
    • first_hour_displayed
    • last_hour_displayed
    • usual_profiles
    • default_slot_range
    • min_slot_range
    • twilight_range
    • mailing_list_name
    • mailing_list_type
    • default_timezone
    • lang
    • admin_num
    • mail_from_address
    • default_view_type
    • address
    • zipcode
    • city
    • state
    • country
    • phone
    • fax
    • email
    • default_notification
    • welcome_cell
  • Table journal: Tous les champs
  • Table log: Tous les champs
  • Table parameter: Tous les champs
  • Table person:
    • hash_password


Exemple de requêtes non autorisées : <sql>SELECT * FROM club;

SELECT hash_password FROM person;

SELECT person.id, validity.* FROM person LEFT JOIN validity ON (person.id=validity.person_id);</sql>