2017-10-03 13:17:12 -04:00
|
|
|
<?php
|
|
|
|
|
2017-10-30 22:02:28 -04:00
|
|
|
namespace v240\AddDownloadCountToAttachments;
|
2017-10-03 13:17:12 -04:00
|
|
|
|
|
|
|
|
2017-10-30 22:02:28 -04:00
|
|
|
class AddToAttachmentsTable extends \AbstractMigration {
|
2017-10-03 13:17:12 -04:00
|
|
|
|
|
|
|
function up($hesk_settings) {
|
|
|
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` ADD COLUMN `download_count` INT NOT NULL DEFAULT 0");
|
|
|
|
}
|
|
|
|
|
|
|
|
function down($hesk_settings) {
|
|
|
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` DROP COLUMN `download_count`");
|
|
|
|
}
|
|
|
|
}
|