1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| CREATE TABLE `agences` (
`agence_id` int(11) NOT NULL AUTO_INCREMENT,
`TempoId` varchar(255) DEFAULT NULL,
`agence_active` tinyint(1) NOT NULL DEFAULT '0',
`cli_id` int(11) NOT NULL DEFAULT '0',
`agence_site` smallint(2) unsigned zerofill NOT NULL DEFAULT '00',
`agence_rs` varchar(255) NOT NULL DEFAULT '',
`agence_adresse1` varchar(255) NOT NULL DEFAULT '',
`agence_adresse2` varchar(255) NOT NULL DEFAULT '',
`agence_pays` int(3) NOT NULL DEFAULT '0',
`agence_region` char(3) DEFAULT '0',
`agence_cp` int(5) NOT NULL DEFAULT '0',
`agence_ville` varchar(255) NOT NULL DEFAULT '',
`agence_ville_id` int(11) DEFAULT NULL,
`agence_lat` double NOT NULL DEFAULT '0',
`agence_long` double NOT NULL DEFAULT '0',
`agence_tel` varchar(20) DEFAULT NULL,
`agence_fax` varchar(20) DEFAULT NULL,
`agence_mail` varchar(255) DEFAULT NULL,
`agence_commercial` varchar(50) DEFAULT NULL,
`agence_web` varchar(255) DEFAULT NULL,
`agence_webpi` varchar(255) DEFAULT NULL,
`agence_quota` int(11) DEFAULT NULL,
`AgenceOuSiege` enum('agence','siege') DEFAULT 'agence',
`NomParent_bk` varchar(64) DEFAULT NULL COMMENT 'A utiliser pour rétablir le cli_id après import massif',
`agence_cvRequired` tinyint(1) DEFAULT NULL,
`agence_actualiseAnnonce` tinyint(1) NOT NULL DEFAULT '0',
`agence_dateCreation` datetime DEFAULT NULL,
`agence_date_debPeriodeEssai` datetime DEFAULT NULL,
`agence_date_finPeriodeEssai` datetime DEFAULT NULL,
PRIMARY KEY (`agence_id`),
KEY `cli_id` (`cli_id`),
CONSTRAINT `agences_ibfk_1` FOREIGN KEY (`cli_id`) REFERENCES `clients` (`cli_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=694 DEFAULT CHARSET=latin1 |
Partager