public function setupColumnsForAddon($addOnId)
{
$schemaManager = $this->app()->db()->getSchemaManager();
if ($addOnId === 'XFRM') {
$schemaManager->alterTable('xf_rm_resource', function(\XF\Db\Schema\Alter $table) {
$table->addColumn('thtrending_positive_rating_count', 'int')->setDefault(0);
$table->addColumn('thtrending_positive_ratings_per_minute', 'decimal', '20,6')->setDefault(0);
});
}
if ($addOnId === 'XFMG') {
$schemaManager->alterTable('xf_mg_media_item', function(\XF\Db\Schema\Alter $table) {
$table->addColumn('thtrending_positive_rating_count', 'int')->setDefault(0);
$table->addColumn('thtrending_views_per_minute', 'decimal', '20,6')->setDefault(0);
$table->addColumn('thtrending_positive_ratings_per_minute', 'decimal', '20,6')->setDefault(0);
$table->addColumn('thtrending_positive_ratings_views_per_minute', 'decimal', '20,6')->setDefault(0);
});
}
}