Structure de la base de données : Différence entre versions
(→Structure) |
|||
Ligne 1 746 : | Ligne 1 746 : | ||
PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='DESCRIPTION OF ALL AIRCLUBS'; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='DESCRIPTION OF ALL AIRCLUBS'; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-- | -- | ||
Ligne 1 949 : | Ligne 1 937 : | ||
CONSTRAINT `validity_2_validity_page_validity_page_id_fk` FOREIGN KEY (`validity_page_id`) REFERENCES `validity_page` (`id`) | CONSTRAINT `validity_2_validity_page_validity_page_id_fk` FOREIGN KEY (`validity_page_id`) REFERENCES `validity_page` (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-- | -- |
Version du 11 juin 2020 à 14:41
Structure
-- -- 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) 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, `group_sales` tinyint(1) NOT NULL DEFAULT '0', 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, `registration_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', `budget_id` int(10) unsigned DEFAULT NULL, `product_id` int(10) unsigned DEFAULT NULL, `signature` varchar(56) DEFAULT NULL, `signature_date` bigint(13) unsigned DEFAULT NULL, `lettering` int(11) DEFAULT NULL, `lettering_date` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx_account_date` (`account_date`), KEY `idx_flow_id` (`flow_id`), KEY `idx_signature_date` (`signature_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) unsigned 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; -- -- 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\r\nfield 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) unsigned 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_training` -- CREATE TABLE `activity_training` ( `activity_id` int(10) unsigned NOT NULL DEFAULT '0', `theme_id` int(10) unsigned NOT NULL DEFAULT '0', `student_id` int(10) DEFAULT NULL, `level_reached` int(10) unsigned DEFAULT NULL, `comment` varchar(255) DEFAULT NULL, `validated` tinyint(1) NOT NULL DEFAULT '0', `checker_person_id` int(10) DEFAULT NULL, `checking_date` datetime DEFAULT NULL, `checking_sentence` varchar(255) DEFAULT NULL, PRIMARY KEY (`activity_id`,`theme_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- 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, `training` tinyint(1) NOT NULL DEFAULT '0', 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, `tolerance_time` int(11) unsigned DEFAULT '6000', `last_counter` 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 '0', `day_alert1` smallint(3) DEFAULT '15', `day_alert2` smallint(3) DEFAULT '0', `day_alert3` smallint(3) DEFAULT '8', 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, `flight_time_formula` varchar(255) DEFAULT NULL, `counter_state` tinyint(2) NOT NULL DEFAULT '-1', `tolerance` int(11) DEFAULT '0', `autonomy` int(11) DEFAULT '5990', `digit_counter_number` tinyint(1) unsigned NOT NULL DEFAULT '4', `true_air_speed` int(10) unsigned NOT NULL DEFAULT '0', 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) 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, `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 `allocation_rule` -- CREATE TABLE `allocation_rule` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `account_id` int(10) NOT NULL, `keyword` varchar(255) DEFAULT NULL, `order_num` int(10) NOT NULL, `amount` tinyint(1) NOT NULL, `mandatory` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Table structure for table `balance` -- CREATE TABLE `balance` ( `account_id` int(10) unsigned NOT NULL, `balance_date_id` int(10) unsigned NOT NULL DEFAULT '0', `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; -- -- 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; -- -- 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; --