Cloudlog/application/migrations/183_add_wab_to_location.php
Peter Goodhall c6716ab57a [WAB] Added ability to store WAB reference in Station Locations
Added ability to store WAB reference in Station Locations and also its exported in ADIF with the custom tag of "APP_CLOUDLOG_MY_WAB"
2024-05-14 15:25:10 +01:00

30 lines
712 B
PHP

<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
* Add WAB Field to Station Location
*/
class Migration_add_wab_to_location extends CI_Migration
{
public function up()
{
if (!$this->db->field_exists('station_wab', 'station_profile')) {
// Add WAB Ref to station profile
$fields = array(
'station_wab varchar(10) DEFAULT NULL',
);
$this->dbforge->add_column('station_profile', $fields);
}
}
public function down()
{
if ($this->db->field_exists('station_wab', 'station_profile')) {
$this->dbforge->drop_column('station_profile', 'station_wab');
}
}
}