version mysql 4.1.9, phpMyAdmin 2.6.1
message d'erreur :
#1005 - Ne peut créer la table '.\alsaservice\categorie.frm' (Errcode: 150) ??
Toutes les tables sont en InnoDB
je m'aperçois que le message s'adresse surtout à la table categorie, car quand je la supprime je n'ai plus aucun problèmes. J'ai bien l'index, j'ai vérifié l'emplacement des tables
Où est le problème?
voici mes tables en fichier.txt :
CREATE TABLE IF NOT EXISTS userstype
(
iduserstype int(2) UNSIGNED ZEROFILL NOT NULL auto_increment,
denominationusers varchar(20) NOT NULL,
PRIMARY KEY(iduserstype)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS usersevaluation
(
idusersevaluation int(2) UNSIGNED ZEROFILL NOT NULL auto_increment,
note int(2) NOT NULL,
commentairenote varchar(30) NULL,
PRIMARY KEY(idusersevaluation)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS userslogin
(
iduserslogin int(8) UNSIGNED ZEROFILL NOT NULL auto_increment,
stringuserslog binary(8) NOT NULL,
PRIMARY KEY(iduserslogin)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS userspassword
(
iduserspassword int(8) UNSIGNED ZEROFILL NOT NULL auto_increment,
stringuserspassword binary(8) NOT NULL,
PRIMARY KEY(iduserspassword)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS service
(
idservice int(2) UNSIGNED NOT NULL,
designationservice varchar(25) NOT NULL,
PRIMARY KEY(idservice)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS modepaiement
(
idtypepaiement int(2) UNSIGNED ZEROFILL NOT NULL,
paiementcheque tinyint(1) NOT NULL,
paiementcarte tinyint(1) NOT NULL,
prelevement tinyint(1) NOT NULL,
PRIMARY KEY(idtypepaiement)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS prestation
(
idprestation int(2) UNSIGNED ZEROFILL NOT NULL,
designationprestation varchar(30) NOT NULL,
PRIMARY KEY(idprestation)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS department
(
iddepartment int(2) NOT NULL auto_increment,
namedepartment varchar(20) NOT NULL,
numberdepartment int(2) NOT NULL,
PRIMARY KEY(iddepartment)
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS ville
(
idville int(6) UNSIGNED ZEROFILL NOT NULL auto_increment,
nameville varchar(30) NOT NULL,
cpville int(5) NOT NULL,
department_id int(2) NOT NULL default'',
index(department_id),
PRIMARY KEY(idville),
FOREIGN KEY (department_id) REFERENCES department(iddepartment) ON DELETE CASCADE
)TYPE=InnoDB;
CREATE TABLE IF NOT EXISTS categorie
(
idcategorie int(2) UNSIGNED ZEROFILL NOT NULL auto_increment,
namecategorie varchar(30) NOT NULL,
service_id int(2) NOT NULL default'',
index(service_id),
PRIMARY KEY(idcategorie),
FOREIGN KEY (service_id) REFERENCES service(idservice) ON DELETE CASCADE
)TYPE=InnoDB;
Partager