]> wagnertech.de Git - projects.git/blobdiff - verleihnix/Verleihnix/impl/data/build/sql/schema.sql
verleihnix komplett eingescheckt
[projects.git] / verleihnix / Verleihnix / impl / data / build / sql / schema.sql
diff --git a/verleihnix/Verleihnix/impl/data/build/sql/schema.sql b/verleihnix/Verleihnix/impl/data/build/sql/schema.sql
new file mode 100644 (file)
index 0000000..34d1c8e
--- /dev/null
@@ -0,0 +1,43 @@
+
+# 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;