From f1df0c8465d7384af6256a8cf1b913fc888bf3fb Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 13 Oct 2010 14:08:55 +0000 Subject: [PATCH] Fix: city is linked with county --- htdocs/install/mysql/migration/2.9.0-3.0.0.sql | 3 --- htdocs/install/mysql/tables/llx_c_ziptown.key.sql | 2 -- htdocs/install/mysql/tables/llx_c_ziptown.sql | 1 - 3 files changed, 6 deletions(-) diff --git a/htdocs/install/mysql/migration/2.9.0-3.0.0.sql b/htdocs/install/mysql/migration/2.9.0-3.0.0.sql index 5f5708cc9ff..567f0d14e78 100644 --- a/htdocs/install/mysql/migration/2.9.0-3.0.0.sql +++ b/htdocs/install/mysql/migration/2.9.0-3.0.0.sql @@ -85,14 +85,11 @@ create table llx_c_ziptown ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, code varchar(5) DEFAULT NULL, - fk_country integer NOT NULL, fk_county integer NOT NULL, zip varchar(10) NOT NULL, town varchar(255) NOT NULL, active tinyint NOT NULL DEFAULT 1 )type=innodb; -ALTER TABLE llx_c_ziptown ADD INDEX idx_c_ziptown_fk_country (fk_country); ALTER TABLE llx_c_ziptown ADD INDEX idx_c_ziptown_fk_county (fk_county); -ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_country FOREIGN KEY (fk_country) REFERENCES llx_c_pays (rowid); ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_county FOREIGN KEY (fk_county) REFERENCES llx_c_departements (rowid); \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_c_ziptown.key.sql b/htdocs/install/mysql/tables/llx_c_ziptown.key.sql index df424327478..eb9cdffcfa2 100644 --- a/htdocs/install/mysql/tables/llx_c_ziptown.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ziptown.key.sql @@ -19,8 +19,6 @@ -- ======================================================================== -ALTER TABLE llx_c_ziptown ADD INDEX idx_c_ziptown_fk_country (fk_country); ALTER TABLE llx_c_ziptown ADD INDEX idx_c_ziptown_fk_county (fk_county); -ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_country FOREIGN KEY (fk_country) REFERENCES llx_c_pays (rowid); ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_county FOREIGN KEY (fk_county) REFERENCES llx_c_departements (rowid); \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_c_ziptown.sql b/htdocs/install/mysql/tables/llx_c_ziptown.sql index afe82644fb3..feeed299f17 100644 --- a/htdocs/install/mysql/tables/llx_c_ziptown.sql +++ b/htdocs/install/mysql/tables/llx_c_ziptown.sql @@ -22,7 +22,6 @@ create table llx_c_ziptown ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, code varchar(5) DEFAULT NULL, -- ex: code insee pour la France - fk_country integer NOT NULL, -- Country id in llx_c_pays fk_county integer NOT NULL, -- County id in llx_c_departements zip varchar(10) NOT NULL, -- Zip code town varchar(255) NOT NULL, -- Town name