From e306b8a8a0bd8b21d4b25d03c07ee30757becffa Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 29 Oct 2020 14:52:34 +0000 Subject: [PATCH] Fixes Migration VUCC index to long --- application/migrations/053_gridsquare_index.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/application/migrations/053_gridsquare_index.php b/application/migrations/053_gridsquare_index.php index 94610e01..c444cee1 100644 --- a/application/migrations/053_gridsquare_index.php +++ b/application/migrations/053_gridsquare_index.php @@ -6,19 +6,12 @@ class Migration_gridsquare_index extends CI_Migration { public function up() { - $sql = "CREATE INDEX HRD_IDX_COL_GRIDSQUARE USING BTREE ON " . $this->config->item('table_name') . " (COL_GRIDSQUARE)"; - $this->db->query($sql); - - $sql = "CREATE INDEX HRD_IDX_COL_VUCC_GRIDS USING BTREE ON " . $this->config->item('table_name') ." (COL_VUCC_GRIDS)"; + $sql = "ALTER TABLE ".$this->config->item('table_name')." ADD INDEX `gridsquares` (`COL_GRIDSQUARE`);"; $this->db->query($sql); } public function down() { - $sql = "ALTER TABLE " . $this->config->item('table_name') . " DROP INDEX HRD_IDX_COL_GRIDSQUARE"; - $this->db->query($sql); - $sql = "ALTER TABLE " . $this->config->item('table_name') . " DROP INDEX HRD_IDX_COL_VUCC_GRIDS"; - $this->db->query($sql); } } \ No newline at end of file