set default value for additional OQRS Option

This commit is contained in:
HB9HIL
2023-12-27 11:55:01 +01:00
parent 250d160b2e
commit 4cedaf3d55
2 changed files with 21 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 165;
$config['migration_version'] = 166;
/*
|--------------------------------------------------------------------------

View File

@@ -0,0 +1,20 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
* Create a dxpedition table
*/
class Migration_set_oqrs_stationname_option extends CI_Migration
{
public function up()
{
$this->db->query("INSERT INTO options (option_name, option_value, autoload) SELECT DISTINCT 'groupedSearchShowStationName', 'on', NULL FROM options WHERE NOT EXISTS (SELECT 1 FROM options WHERE option_name = 'groupedSearchShowStationName');");
}
public function down()
{
$this->db->query("DELETE FROM options WHERE option_name = 'groupedSearchShowStationName';");
}
}