芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/migrations/20200916134817_remove_old_screenshots_migration.php
. */ use Phinx\Migration\AbstractMigration; class RemoveOldScreenshotsMigration extends AbstractMigration { /** @inheritDoc */ public function change() { // add the task $table = $this->table('task'); $table->insert([ [ 'name' => 'Remove Old Screenshots', 'class' => '\Xibo\XTR\RemoveOldScreenshotsTask', 'options' => '[]', 'schedule' => '0 0 * * * *', 'isActive' => '1', 'configFile' => '/tasks/remove-old-screenshots.task' ], ])->save(); // Add the ttl setting if (!$this->fetchRow('SELECT * FROM `setting` WHERE setting = \'DISPLAY_SCREENSHOT_TTL\'')) { $this->table('setting')->insert([ [ 'setting' => 'DISPLAY_SCREENSHOT_TTL', 'value' => 0, 'userSee' => 1, 'userChange' => 1 ] ])->save(); } } }