The forum search does NOT search by a set of words, just individual words.
I need help.
I had all 87 table definitions is a single file that made the DB just fine.
I created a project, made individual files in TABLES for each table definition and hit BUILD (DEPLOY has the same issue)
" Table `user` is used before it is declared in the project. Check the file position in build order in the project options."
Well, yes.
COMPANY has a FK to COMPANY TYPE
Both COMPANY and COMPANY TYPE have a FK to USER (created_by_id)
OK, simple, place USER before COMPANY TYPE.
But USER has a FK to CONTACT
AND CONTACT has a FK to COMPANY
See my problem?
There must be a setting somewhere that say IGNORE table order, just build the damn thing, and give me a report at the end of any tables that are missing
Please help.
This is my "PreDeployment" file:
Code: Select all
--
-- Disable foreign keys
--
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
--
-- Set SQL mode
--
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
/*!40101 SET @COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
--
-- Set character set the client will use to send SQL statements to the server
--
SET NAMES 'utf8';
--
-- OK, set it up!
--
DROP DATABASE IF EXISTS `xrms2`;
CREATE DATABASE IF NOT EXISTS `xrms2`
CHARACTER SET `utf8`
COLLATE `utf8_general_ci`;
--
-- Set default database
--
USE `xrms2`;