-- ---------------------------------------------------------------------- -- MySQL GRT Application -- SQL Script -- ---------------------------------------------------------------------- SET FOREIGN_KEY_CHECKS = 0; CREATE DATABASE IF NOT EXISTS `test`; -- ------------------------------------- -- Tables DROP TABLE IF EXISTS `test`.`organization`; CREATE TABLE `test`.`organization` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `FKorganization_office_id` NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `FKorganization_office` FOREIGN KEY `FKorganization_office` (`FKorganization_office_id`) REFERENCES `test`.`organization_office` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET latin1 COLLATE latin1_swedish_ci; DROP TABLE IF EXISTS `test`.`organization_office`; CREATE TABLE `test`.`organization_office` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `FKorganization_id` NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `FKorganization` FOREIGN KEY `FKorganization` (`FKorganization_id`) REFERENCES `test`.`organization` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET latin1 COLLATE latin1_swedish_ci; SET FOREIGN_KEY_CHECKS = 1; -- ---------------------------------------------------------------------- -- EOF