
# 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;

-- ---------------------------------------------------------------------
-- medium
-- ---------------------------------------------------------------------

DROP TABLE IF EXISTS `medium`;

CREATE TABLE `medium`
(
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `mod` INTEGER NOT NULL,
    `autor` VARCHAR(100) NOT NULL,
    `titel` VARCHAR(100) NOT NULL,
    `eigentumer` VARCHAR(100) NOT NULL,
    `zz_bei` VARCHAR(100) NOT NULL,
    `kommentar` VARCHAR(100) NOT NULL,
    `class_key` INTEGER NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM;

-- ---------------------------------------------------------------------
-- werkzeug
-- ---------------------------------------------------------------------

DROP TABLE IF EXISTS `werkzeug`;

CREATE TABLE `werkzeug`
(
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `mod` INTEGER NOT NULL,
    `typ` VARCHAR(100) NOT NULL,
    `beschreibung` VARCHAR(100) NOT NULL,
    `eigentumer` VARCHAR(100) NOT NULL,
    `zz_bei` VARCHAR(100) NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=MyISAM;

# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
