Added migration file for index on col_gridsquare and col_vucc_grids to speed up VUCC award a bit.

pull/673/head
Andreas 2020-10-25 15:17:06 +01:00
rodzic 690ee4dcb4
commit 5a380a2cf1
2 zmienionych plików z 25 dodań i 1 usunięć

Wyświetl plik

@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 52;
$config['migration_version'] = 53;
/*
|--------------------------------------------------------------------------

Wyświetl plik

@ -0,0 +1,24 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
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)";
$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);
}
}