From 1fbaa6f68a6dd6678d0742ca1b2359c680a8a8ee Mon Sep 17 00:00:00 2001 From: HB9HIL <80885850+HB9HIL@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:32:53 +0200 Subject: [PATCH] missing second relation for relationship table Line 10 does only refer to the releation between logbook_relationships and logbook_id. The relation between logbook_relationships and location_id was missing --- application/migrations/206_add_fks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/migrations/206_add_fks.php b/application/migrations/206_add_fks.php index 6423ab511..75451d180 100644 --- a/application/migrations/206_add_fks.php +++ b/application/migrations/206_add_fks.php @@ -8,6 +8,7 @@ class Migration_add_fks extends CI_Migration { $this->dbtry("delete from api where not exists (select 1 from users where user_id = api.user_id);"); $this->dbtry("delete from bandxuser where not exists (select 1 from users where user_id = bandxuser.userid);"); $this->dbtry("delete from station_logbooks_relationship where not exists (select 1 from station_logbooks where station_logbook_id = station_logbooks_relationship.station_logbook_id);"); + $this->dbtry("delete from station_logbooks_relationship where not exists (select 1 from station_profile where station_id = station_logbooks_relationship.station_location_id);"); $this->dbtry("delete from eQSL_images where not exists (select 1 from ".$this->config->item('table_name')." log where log.COL_PRIMARY_KEY=eQSL_images.qso_id);"); $this->dbtry("delete from qsl_images where not exists (select 1 from ".$this->config->item('table_name')." log where log.COL_PRIMARY_KEY=qsl_images.qsoid);"); $this->dbtry("delete from station_logbooks where not exists (select 1 from users where user_id = station_logbooks.user_id);");