芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/fmd/cache/bf/migrations/20180131113948_old_upgrade_step88_migration.php
hasTable('version')) { // We do have a version table, so we're an upgrade from anything 1.7.0 onward. $row = $this->fetchRow('SELECT * FROM `version`'); $dbVersion = $row['DBVersion']; // Are we on the relevent step for this upgrade? if ($dbVersion < $STEP) { // Perform the upgrade $auditLog = $this->table('auditlog', ['id' => 'logId']); $auditLog->addColumn('logDate', 'integer') ->addColumn('userId', 'integer') ->addColumn('message', 'string', ['limit' => 255]) ->addColumn('entity', 'string', ['limit' => 50]) ->addColumn('entityId', 'integer') ->addColumn('objectAfter', 'text') ->save(); $this->execute('INSERT INTO `pages` (`name`, `pagegroupID`) SELECT \'auditlog\', pagegroupID FROM `pagegroup` WHERE pagegroup.pagegroup = \'Reports\';'); $group = $this->table('group'); if (!$group->hasColumn('libraryQuota')) { $group->addColumn('libraryQuota', 'integer', ['null' => true]) ->save(); } // Bump our version $this->execute('UPDATE `version` SET DBVersion = ' . $STEP); } } } }