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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| set autocommit = 0;
start transaction;
-- ======================
-- Base de Données `base`
-- ======================
DROP DATABASE IF EXISTS `base`;
CREATE DATABASE `base`
default character set `latin1`
default collate `latin1_general_ci`;
USE `base`;
-- ================
-- Table `position`
-- ================
DROP TABLE IF EXISTS `position`;
CREATE TABLE `position`
( `pos_id` smallint not null auto_increment,
`positionX` integer null default null,
`positionY` integer null default null,
primary key (`pos_id`)
) engine=innoDB
default charset=latin1 collate=latin1_general_ci
row_format=compressed;
-- ==================
-- Table `machinenew`
-- ==================
DROP TABLE IF EXISTS `machinenew`;
CREATE TABLE `machinenew`
( `mach_id` smallint not null auto_increment,
`mach_name` varchar(255) null,
`type_id` smallint null,
`pos_id` smallint null,
`localization` varchar(255) null default null,
`pays` varchar(255) not null default '',
`entite` varchar(255) null default null,
`perimetre` set('Oui','Non') null default null,
`type` varchar(255) null default null,
`comment` varchar(255) null default null,
`ip` varchar(255) null default null,
`contact_name` varchar(255) null default null,
`contact_phone` varchar(255) null default null,
constraint `pk_machine` primary key(`mach_id`),
-- constraint `fk_machine_type` foreign key(`type_id`) references `serveur_type` (`type_id`) on delete restrict on update cascade,
constraint `fk_machine_position` foreign key(`pos_id`) references `position` (`pos_id`) on delete restrict on update cascade
) engine=innoDB
default charset=latin1 collate=latin1_general_ci
row_format=compressed;
-- ===
-- Fin
-- ===
commit;
set autocommit = 1; |
Partager