goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
299 stars 199 forks source link

Nordrassil do not import or generate FOREIGN KEY and INDEX #71

Open cesarliws opened 10 years ago

cesarliws commented 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;

goFrendiAsgard commented 10 years ago

dbforge doesn't support foreign key (as far as I know), so it is going to be impossible for now