# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------------------------------------------------
-- addresses
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `addresses`;
CREATE TABLE `addresses`
(
`id` INTEGER(5) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(32) NOT NULL,
`surname` VARCHAR(32) NOT NULL,
`address` VARCHAR(32) NOT NULL,
`zip_code` INTEGER(5) NOT NULL,
`city` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------
-- city_list
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `city_list`;
CREATE TABLE `city_list`
(
`id` INTEGER(5) NOT NULL AUTO_INCREMENT,
`city` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
|