<?php
namespace Datacake\Core\Migration;
use Datacake\Core\Models\IspCity;
use Datacake\Core\Includes\DatacakeCoreActivator;

global $wpdb;

// Had to change the name
// Creating City Table
$CityEntity = new IspCity();
$cityTableName = $CityEntity->getTable();
$sql = "ALTER TABLE  `$cityTableName` 
    ADD `short_name` varchar(255)  DEFAULT NULL AFTER `name`,
    ADD `redirect_url` varchar(255) DEFAULT NULL AFTER `remote_id`;";
if($wpdb->query($sql)){
    // Adding Foreing key contrains
    update_option(DatacakeCoreActivator::$config_name,'1.1.1');
}