Structure
CREATE TABLE IF NOT EXISTS `account` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creation_date` date DEFAULT NULL,
`name` text CHARACTER SET latin1,
`export_account` text CHARACTER SET latin1,
`activated` int(1) DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of account';
CREATE TABLE IF NOT EXISTS `account_aircraft` (
`account_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`aircraft_id` int(11) DEFAULT NULL,
`account_type` int(10) UNSIGNED DEFAULT NULL,
PRIMARY KEY (`account_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of aircraft accounts';
CREATE TABLE IF NOT EXISTS `account_aircraft_type` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1,
`activated` tinyint(1) NOT NULL DEFAULT '1',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='account aircraft type description';
CREATE TABLE IF NOT EXISTS `account_club` (
`account_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`payment_allowed` tinyint(1) UNSIGNED DEFAULT '0',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`account_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of club accounts';
CREATE TABLE IF NOT EXISTS `account_entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`double_entry_id` int(11) DEFAULT NULL,
`account_date` datetime DEFAULT NULL,
`account_id` int(11) DEFAULT NULL,
`credit` decimal(15,2) DEFAULT '0.00',
`debit` decimal(15,2) DEFAULT '0.00',
`payment_type` int(10) UNSIGNED DEFAULT NULL,
`payment_description` text CHARACTER SET latin1,
`person_delivery_id` int(10) UNSIGNED DEFAULT NULL,
`comments` text CHARACTER SET latin1,
`validated` int(1) DEFAULT '0',
`exported` int(1) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx_account_date` (`account_date`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of account entries';
CREATE TABLE IF NOT EXISTS `account_member` (
`account_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`member_id` int(11) DEFAULT NULL,
`account_type` int(10) UNSIGNED DEFAULT NULL,
PRIMARY KEY (`account_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of member accounts';
CREATE TABLE IF NOT EXISTS `account_member_type` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1,
`activated` tinyint(1) NOT NULL DEFAULT '1',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of account member types';
CREATE TABLE IF NOT EXISTS `aircraft` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`callsign` varchar(255) DEFAULT NULL,
`type` int(10) UNSIGNED DEFAULT NULL,
`comments` varchar(255) DEFAULT NULL,
`non_bookable` tinyint(1) 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',
`tolerance_time` int(11) UNSIGNED DEFAULT '6000',
`last_counter` int(11) DEFAULT NULL,
`activated` tinyint(1) UNSIGNED DEFAULT '1',
`time_alert1` int(11) DEFAULT '6000',
`time_alert2` int(11) DEFAULT '0',
`time_alert3` int(11) DEFAULT '0',
`day_alert1` smallint(3) DEFAULT '15',
`day_alert2` smallint(3) DEFAULT '0',
`day_alert3` smallint(3) DEFAULT '8',
`non_flightable` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `CALLSIGN` (`callsign`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ALL AIRCRAFTS OF ALL AIRCLUBS';
CREATE TABLE IF NOT EXISTS `aircraft_type` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_desc` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`name` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`seats_available` tinyint(3) UNSIGNED DEFAULT '1',
`comments` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`flight_time_formula` varchar(255) CHARACTER SET latin1 DEFAULT '%DURATION',
`counter_state` tinyint(2) NOT NULL DEFAULT '-1',
`tolerance` int(11) DEFAULT '0',
`autonomy` int(11) DEFAULT '5990',
`activated` tinyint(1) UNSIGNED NOT NULL DEFAULT '1',
`digit_counter_number` tinyint(1) UNSIGNED NOT NULL DEFAULT '4',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Types of aircraft';
CREATE TABLE IF NOT EXISTS `aircraft_type_allowed_function` (
`aircraft_type_id` int(10) UNSIGNED DEFAULT NULL,
`place_num` int(10) UNSIGNED DEFAULT NULL,
`function_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of allowed functions for each aircraft type';
CREATE TABLE IF NOT EXISTS `aircraft_type_mandatory_flight_type` (
`aircraft_type_id` int(10) UNSIGNED DEFAULT NULL,
`flight_type_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of compulsory flight type for each aircraft type';
CREATE TABLE IF NOT EXISTS `aircraft_type_qualif` (
`aircraft_type_id` int(10) UNSIGNED DEFAULT NULL,
`check_num` int(10) UNSIGNED DEFAULT NULL,
`qualification_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Types of qualif required for each aircraft type';
CREATE TABLE IF NOT EXISTS `aircraft_type_uncomp_flight_type` (
`aircraft_type_id` int(10) UNSIGNED DEFAULT NULL,
`flight_type_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of uncompatible flight type for each aircraft type';
CREATE TABLE IF NOT EXISTS `authentication` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`profile` mediumint(8) UNSIGNED DEFAULT NULL,
`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',
`aircrafts_viewed` varchar(255) DEFAULT NULL,
`inst_viewed` varchar(255) DEFAULT NULL,
`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,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='used for authentication';
CREATE TABLE IF NOT EXISTS `balance` (
`account_id` int(10) UNSIGNED NOT NULL,
`balance_date_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`debit` decimal(15,2) DEFAULT '0.00',
`credit` decimal(15,2) DEFAULT '0.00',
PRIMARY KEY (`account_id`,`balance_date_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `balance_date` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`balance_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `booking` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
`aircraft_id` int(10) UNSIGNED DEFAULT NULL,
`member_id` int(10) UNSIGNED DEFAULT NULL,
`slot_type` tinyint(3) UNSIGNED DEFAULT NULL,
`instructor_id` int(10) UNSIGNED DEFAULT NULL,
`free_seats` tinyint(3) UNSIGNED DEFAULT NULL,
`comments` varchar(255) DEFAULT NULL,
`airfield` varchar(6) DEFAULT NULL,
`estimated_duration` int(10) UNSIGNED DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='RECORDS ALL THE SLOTS OF ALL AIRCRAFTS OF ALL AIRCLUBS';
CREATE TABLE IF NOT EXISTS `club` (
`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` mediumint(8) UNSIGNED DEFAULT NULL,
`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,
`club_site_url` varchar(255) DEFAULT NULL,
`default_timezone` varchar(255) NOT NULL,
`lang` varchar(255) NOT NULL,
`admin_num` int(10) UNSIGNED NOT NULL,
`mail_from_address` varchar(255) DEFAULT 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,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='DESCRIPTION OF ALL AIRCLUBS';
CREATE TABLE IF NOT EXISTS `criteria` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`label` varchar(255) CHARACTER SET latin1 NOT NULL,
`predicate` text CHARACTER SET latin1 NOT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `default_display` (
`authentication_id` int(10) UNSIGNED NOT NULL,
`display_key` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT '',
`display_value` text CHARACTER SET latin1,
PRIMARY KEY (`authentication_id`,`display_key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `exceptionnal_inst_date` (
`instructor_id` int(10) UNSIGNED NOT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
`presence` tinyint(1) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `favorite_icao` (
`icao` varchar(6) NOT NULL,
PRIMARY KEY (`icao`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='favorite airfield list';
CREATE TABLE IF NOT EXISTS `fhp_aircraft_type` (
`fhp_id` int(10) DEFAULT NULL,
`aircraft_type_id` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='flight hour pricing aircraft type list';
CREATE TABLE IF NOT EXISTS `fhp_flight_type` (
`fhp_id` int(10) DEFAULT NULL,
`flight_type_id` int(10) DEFAULT NULL,
`excluded` tinyint(1) UNSIGNED DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='flight hour pricing flight type list';
CREATE TABLE IF NOT EXISTS `fhp_member_pool` (
`fhp_id` int(10) DEFAULT NULL,
`member_pool_id` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='flight hour pricing flight type list';
CREATE TABLE IF NOT EXISTS `flight` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`aircraft_id` int(10) UNSIGNED DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`duration` int(10) UNSIGNED DEFAULT NULL,
`flight_type_id` int(10) UNSIGNED DEFAULT NULL,
`people_onboard` int(10) UNSIGNED DEFAULT NULL,
`airfield_departure` varchar(6) CHARACTER SET latin1 DEFAULT NULL,
`airfield_arrival` varchar(6) CHARACTER SET latin1 DEFAULT NULL,
`counter_departure` int(10) UNSIGNED DEFAULT NULL,
`counter_arrival` int(10) UNSIGNED DEFAULT NULL,
`landing_number` int(10) UNSIGNED DEFAULT NULL,
`comments` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`airborne` tinyint(1) UNSIGNED DEFAULT NULL,
`validated` tinyint(3) UNSIGNED DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='list of flight';
CREATE TABLE IF NOT EXISTS `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`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='flight account entry join';
CREATE TABLE IF NOT EXISTS `flight_hours_pricing` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1,
`price_formula` text CHARACTER SET latin1,
`price_sentence` text CHARACTER SET latin1,
`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',
`member_debited` tinyint(1) UNSIGNED DEFAULT '1',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='list of flight hours pricing formula';
CREATE TABLE IF NOT EXISTS `flight_pilot` (
`flight_id` int(10) UNSIGNED NOT NULL,
`pilot_id` int(10) UNSIGNED NOT NULL,
`function_id` int(10) UNSIGNED DEFAULT NULL,
`num` int(10) UNSIGNED DEFAULT NULL,
PRIMARY KEY (`flight_id`,`pilot_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='list of crew for each flight';
CREATE TABLE IF NOT EXISTS `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) CHARACTER SET latin1 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=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `flight_type` (
`id` int(10) UNSIGNED NOT NULL,
`name` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='list of flight type';
CREATE TABLE IF NOT EXISTS `flight_type_mandatory_qualification` (
`flight_type_id` int(10) UNSIGNED NOT NULL,
`qualification_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`flight_type_id`,`qualification_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='list of mandatory qualification for each flight type';
CREATE TABLE IF NOT EXISTS `icao` (
`name` varchar(64) DEFAULT NULL,
`icao` varchar(6) NOT NULL,
`lat` float DEFAULT NULL,
`lon` float DEFAULT NULL,
`alt` smallint(6) DEFAULT NULL,
PRIMARY KEY (`icao`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='airfields coord';
CREATE TABLE IF NOT EXISTS `instructor` (
`id` int(10) UNSIGNED NOT NULL,
`sign` varchar(255) DEFAULT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='LIST INSTRUCTORS AND THEIR AUTORIZATIONS';
CREATE TABLE IF NOT EXISTS `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=MyISAM DEFAULT CHARSET=latin1 COMMENT='BLACKLISTED IP';
CREATE TABLE IF NOT EXISTS `journal` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`login` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`date_log` datetime DEFAULT NULL,
`rights` text CHARACTER SET latin1,
`rights2` text CHARACTER SET latin1,
`is_member` tinyint(1) UNSIGNED DEFAULT NULL,
`is_instructor` tinyint(1) UNSIGNED DEFAULT NULL,
`action` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_date_log` (`date_log`),
KEY `idx_action` (`action`(8))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='list of logs';
CREATE TABLE IF NOT EXISTS `key_assignment` (
`key_id` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
`key_name` tinytext CHARACTER SET latin1,
`aircraft_id` int(10) UNSIGNED DEFAULT '0',
`key_state` tinyint(1) UNSIGNED DEFAULT '0',
`key_word` bigint(20) UNSIGNED DEFAULT NULL,
PRIMARY KEY (`key_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='key assignment description';
CREATE TABLE IF NOT EXISTS `key_host` (
`id` tinyint(2) NOT NULL AUTO_INCREMENT,
`timeout` tinyint(2) UNSIGNED NOT NULL DEFAULT '10',
`num_key` tinyint(2) UNSIGNED NOT NULL DEFAULT '10',
`ipkey` varchar(50) CHARACTER SET latin1 NOT NULL,
`httpport` varchar(4) CHARACTER SET latin1 NOT NULL DEFAULT '4080',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='key host configuration';
CREATE TABLE IF NOT EXISTS `log` (
`journal_id` int(10) UNSIGNED NOT NULL,
`action` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`table_name` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`field_name` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`field_value` text CHARACTER SET latin1,
KEY `journal_id` (`journal_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='part of logs';
CREATE TABLE IF NOT EXISTS `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=MyISAM DEFAULT CHARSET=latin1 COMMENT='BLACKLISTED LOGIN';
CREATE TABLE IF NOT EXISTS `member` (
`id` int(10) UNSIGNED NOT NULL,
`member_num` int(11) DEFAULT NULL,
`subscription` date NOT NULL DEFAULT '2003-12-31',
`qualif_alert_delay` tinyint(3) UNSIGNED NOT NULL DEFAULT '8',
`inscription_date` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ALL MEMBERS OF ALL AIRCLUBS';
CREATE TABLE IF NOT EXISTS `member_awaiting_activation` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`login` varchar(255) CHARACTER SET latin1 NOT NULL,
`ip` varchar(255) CHARACTER SET latin1 NOT NULL,
`code` varchar(255) CHARACTER SET latin1 NOT NULL,
`category` varchar(255) CHARACTER SET latin1 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `member_pool` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1,
`required_account_type` int(10) UNSIGNED DEFAULT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of member pool';
CREATE TABLE IF NOT EXISTS `member_pool_join` (
`member_pool_id` int(10) UNSIGNED DEFAULT NULL,
`member_id` int(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Correspondance between pools and members';
CREATE TABLE IF NOT EXISTS `member_qualif` (
`member_id` int(10) UNSIGNED NOT NULL,
`qualif_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 (`member_id`,`qualif_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='QUALIFICATIONS OF EACH MEMBER';
CREATE TABLE IF NOT EXISTS `nationality` (
`code` char(2) NOT NULL DEFAULT '',
`label` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
PRIMARY KEY (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `parameter` (
`code` varchar(255) NOT NULL,
`enabled` tinyint(1) UNSIGNED DEFAULT '0',
`int_value` int(10) UNSIGNED DEFAULT '0',
`char_value` varchar(255) DEFAULT NULL,
PRIMARY KEY (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='APPLICATION PARAMETERS';
CREATE TABLE IF NOT EXISTS `payment_distribution` (
`payment_id` int(10) UNSIGNED DEFAULT NULL,
`account_club_id` int(10) UNSIGNED DEFAULT NULL,
`person_delivery` tinyint(1) UNSIGNED DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='payment distribution description';
CREATE TABLE IF NOT EXISTS `payment_type` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1,
`text_field_label` text CHARACTER SET latin1,
`supplier` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`only_admin` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='type of payment description';
CREATE TABLE IF NOT EXISTS `pilot_function` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`abbrev` varchar(10) CHARACTER SET latin1 DEFAULT NULL,
`name` varchar(100) CHARACTER SET latin1 DEFAULT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of functions for pilot';
CREATE TABLE IF NOT EXISTS `pricing_value` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`variable_id` int(11) NOT NULL,
`assign_value` decimal(10,2) NOT NULL,
`start_date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `pricing_variable` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`variable` varchar(255) CHARACTER SET latin1 NOT NULL,
`label` varchar(255) CHARACTER SET latin1 NOT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `profile` (
`id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`name` varchar(255) DEFAULT NULL,
`permits` int(10) UNSIGNED DEFAULT NULL,
`permits2` int(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `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) CHARACTER SET latin1 DEFAULT NULL,
`payment_type_id` int(10) UNSIGNED NOT NULL,
`state` int(10) UNSIGNED NOT NULL DEFAULT '0',
`bank_answer` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
`bank_misc` varchar(255) CHARACTER SET latin1 DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `qualification` (
`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) UNSIGNED NOT NULL DEFAULT '0',
`grant_date_enable` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`is_for_instructor` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`mandatory` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`experience_formula` varchar(255) DEFAULT NULL,
`order_num` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='QUALIFICATIONS LIST';
CREATE TABLE IF NOT EXISTS `regular_presence_inst_date` (
`instructor_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
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `sale` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`entry_id` int(10) UNSIGNED DEFAULT NULL,
`unit_price` float DEFAULT NULL,
`quantity` float DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of sales';
CREATE TABLE IF NOT EXISTS `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) CHARACTER SET latin1 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `uncomp_flight_type` (
`id1` int(10) UNSIGNED DEFAULT NULL,
`id2` int(10) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='List of sales';