Structure de la base de données : Différence entre versions

Aller à : navigation, rechercher
(Structure)
(Champs cachés)
Ligne 1 759 : Ligne 1 759 :
  
 
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é :
 
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 club:
+
*Table structure :
 
**name
 
**name
 
**info_cell
 
**info_cell

Version du 10 novembre 2017 à 16:09

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) 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- 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;
 
--
-- Table structure for table `business_field_group`
--
 
CREATE TABLE `business_field_group` (
  `id` int(10) unsigned NOT