From 745a2f7c67a9ed9ebadf87034a22b8e5cc108c18 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 20 Dec 2021 07:09:23 +0100 Subject: [PATCH] Corrected field name in the downgrade method of a migration class --- ...24_rename_id_service_categories_column_of_services_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/024_rename_id_service_categories_column_of_services_table.php b/application/migrations/024_rename_id_service_categories_column_of_services_table.php index ea31b4ab..e5f7072c 100644 --- a/application/migrations/024_rename_id_service_categories_column_of_services_table.php +++ b/application/migrations/024_rename_id_service_categories_column_of_services_table.php @@ -58,7 +58,7 @@ class Migration_Rename_id_service_categories_column_of_services_table extends EA $this->dbforge->modify_column('services', $fields); $this->db->query('ALTER TABLE `' . $this->db->dbprefix('services') . '` - ADD CONSTRAINT `services_service_categories` FOREIGN KEY (`id_categories`) REFERENCES `' . $this->db->dbprefix('categories') . '` (`id`) + ADD CONSTRAINT `services_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE'); }