kopia lustrzana https://github.com/magicbug/Cloudlog
Added migration file for index on col_gridsquare and col_vucc_grids to speed up VUCC award a bit.
rodzic
690ee4dcb4
commit
5a380a2cf1
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
||||||
| be upgraded / downgraded to.
|
| be upgraded / downgraded to.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['migration_version'] = 52;
|
$config['migration_version'] = 53;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Ładowanie…
Reference in New Issue