Created
September 19, 2011 12:20
-
-
Save ptica/1226385 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function after($event = array()) { | |
// on MYSQL: retype columns to mediumtext, as we store whole api response | |
// that is longer than std 64kB of mysql text | |
if (isset($event['create']) && $event['create'] == 'saved_queries') { | |
$db = &ConnectionManager::getDataSource($this->connection); | |
$sql = 'alter table saved_queries modify content mediumtext'; | |
if (substr($db->config['driver'], 0, 5) == 'mysql') $db->execute($sql); | |
} | |
if (isset($event['create']) && $event['create'] == 'contracts') { | |
$db = &ConnectionManager::getDataSource($this->connection); | |
$sql = 'alter table contracts modify saved_query_content mediumtext'; | |
if (substr($db->config['driver'], 0, 5) == 'mysql') $db->execute($sql); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment