Open cesarliws opened 10 years ago
For several tables I have this constraints defined, but it is ignored by nordrassil:
CREATE TABLE comx_cadastro_contato ( contatoid BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, empresaid BIGINT(20) UNSIGNED NULL DEFAULT NULL, nome VARCHAR(120) NOT NULL, natureza CHAR(1) NOT NULL DEFAULT 'P', cpf VARCHAR(20) NULL DEFAULT NULL, rg VARCHAR(20) NULL DEFAULT NULL, cnpj VARCHAR(20) NULL DEFAULT NULL, inscricaoestadual VARCHAR(30) NULL DEFAULT NULL, incricaomunicipal VARCHAR(30) NULL DEFAULT NULL, cliente TINYINT(1) NOT NULL DEFAULT '0', fornecedor TINYINT(1) NOT NULL DEFAULT '0', colaborador TINYINT(1) NOT NULL DEFAULT '0', status CHAR(1) NOT NULL DEFAULT 'A', editdate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (contatoid), INDEX fk_contato_empresa (empresaid), CONSTRAINT fk_contato_empresa FOREIGN KEY (empresaid) REFERENCES comx_cadastro_contato (contatoid) ON UPDATE NO ACTION ON DELETE NO ACTION ) COLLATE='utf8_general_ci' ENGINE=InnoDB;
comx_cadastro_contato
contatoid
empresaid
nome
natureza
cpf
rg
cnpj
inscricaoestadual
incricaomunicipal
cliente
fornecedor
colaborador
status
editdate
fk_contato_empresa
dbforge doesn't support foreign key (as far as I know), so it is going to be impossible for now
For several tables I have this constraints defined, but it is ignored by nordrassil:
CREATE TABLE
comx_cadastro_contato
(contatoid
BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,empresaid
BIGINT(20) UNSIGNED NULL DEFAULT NULL,nome
VARCHAR(120) NOT NULL,natureza
CHAR(1) NOT NULL DEFAULT 'P',cpf
VARCHAR(20) NULL DEFAULT NULL,rg
VARCHAR(20) NULL DEFAULT NULL,cnpj
VARCHAR(20) NULL DEFAULT NULL,inscricaoestadual
VARCHAR(30) NULL DEFAULT NULL,incricaomunicipal
VARCHAR(30) NULL DEFAULT NULL,cliente
TINYINT(1) NOT NULL DEFAULT '0',fornecedor
TINYINT(1) NOT NULL DEFAULT '0',colaborador
TINYINT(1) NOT NULL DEFAULT '0',status
CHAR(1) NOT NULL DEFAULT 'A',editdate
TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (contatoid
), INDEXfk_contato_empresa
(empresaid
), CONSTRAINTfk_contato_empresa
FOREIGN KEY (empresaid
) REFERENCEScomx_cadastro_contato
(contatoid
) ON UPDATE NO ACTION ON DELETE NO ACTION ) COLLATE='utf8_general_ci' ENGINE=InnoDB;