2022-10-10 18:56:46 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This migration creates a table called options which will hold global options needed within cloudlog
|
|
|
|
* removing the need for lots of configuration files.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Migration_add_version_two_trigger_to_options extends CI_Migration {
|
|
|
|
|
|
|
|
public function up()
|
|
|
|
{
|
2023-08-28 14:26:48 +00:00
|
|
|
|
2022-10-10 18:56:46 +00:00
|
|
|
$data = array(
|
|
|
|
array('option_name' => "version2_trigger", 'option_value' => "false", 'autoload' => "yes"),
|
2023-03-15 13:40:32 +00:00
|
|
|
);
|
2022-10-10 18:56:46 +00:00
|
|
|
|
2023-03-15 13:40:32 +00:00
|
|
|
$query = $this->db->select('option_name')->where('option_name', 'version2_trigger')->get('options');
|
|
|
|
if($query->num_rows() == 0) {
|
|
|
|
$this->db->insert_batch('options', $data);
|
|
|
|
}
|
2023-08-28 14:26:48 +00:00
|
|
|
|
2022-10-10 18:56:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
// No option to down
|
|
|
|
}
|
|
|
|
}
|