Fix: city is linked with county

This commit is contained in:
Regis Houssin 2010-10-13 14:08:55 +00:00
parent ab8e470251
commit f1df0c8465
3 changed files with 0 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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