Cloudlog/application/migrations/207_add_radio_panel_option_to_logbook.php
Peter Goodhall 5ff5e12890 Add public radio status option to logbooks
Introduces a new 'public_radio_status' field to station logbooks, allowing users to enable or disable the display of radio status on public logbook pages. Updates migration, controllers, model, views, and language files to support this feature and provide UI controls for toggling the option.
2025-08-22 14:52:07 +01:00

29 行
782 B
PHP

<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
* This adds an option to enable/disable Radio Status panel on public logbook displays
*/
class Migration_add_radio_panel_option_to_logbook extends CI_Migration
{
public function up()
{
if (!$this->db->field_exists('public_radio_status', 'station_logbooks')) {
$fields = array(
'public_radio_status integer DEFAULT 0 AFTER public_search',
);
$this->dbforge->add_column('station_logbooks', $fields);
}
}
public function down()
{
if ($this->db->field_exists('public_radio_status', 'station_logbooks')) {
$this->dbforge->drop_column('station_logbooks', 'public_radio_status');
}
}
}