1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| CREATE TABLE IF NOT EXISTS `machinenew` (
mach_id smallint(6) not null auto_increment
, mach_name varchar(20)
, type_id smallint(6)
, pos_id smallint(6),
`localization` varchar(30) COLLATE latin1_bin DEFAULT NULL,
`pays` varchar(30) COLLATE latin1_bin NOT NULL DEFAULT '',
`entite` varchar(20) COLLATE latin1_bin DEFAULT NULL,
`perimetre` set('Oui','Non') COLLATE latin1_bin DEFAULT NULL,
`type` varchar(20) COLLATE latin1_bin DEFAULT NULL,
`comment` varchar(100) COLLATE latin1_bin DEFAULT NULL,
`ip` varchar(15) COLLATE latin1_bin DEFAULT NULL,
`contact_name` varchar(50) COLLATE latin1_bin DEFAULT NULL,
`contact_phone` varchar(50) COLLATE latin1_bin DEFAULT NULL,
CONSTRAINT pk_machine PRIMARY KEY(mach_id)
, CONSTRAINT fk_machine_type FOREIGN KEY(type_id)
REFERENCES serveur_type(type_id)
, CONSTRAINT fk_machine_position FOREIGN KEY(pos_id)
REFERENCES position(pos_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin AUTO_INCREMENT=427 ; |
Partager