CC-5781: Upgrade script for new storage quota implementation
Upgrade script for local installs SAAS requires a different script
This commit is contained in:
parent
70e660e7da
commit
3adaf8e370
|
@ -1,29 +1,5 @@
|
|||
<?php
|
||||
|
||||
// Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/../airtime_mvc/application'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
get_include_path(),
|
||||
realpath(APPLICATION_PATH . '/../library')
|
||||
)));
|
||||
|
||||
/*set_include_path(implode(PATH_SEPARATOR, array(
|
||||
get_include_path(),
|
||||
realpath(APPLICATION_PATH . '/../library/propel/runtime/lib')
|
||||
)));*/
|
||||
|
||||
//Propel classes.
|
||||
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(APPLICATION_PATH . '/models/airtime' . PATH_SEPARATOR . get_include_path());
|
||||
set_include_path(APPLICATION_PATH . '/models/om' . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
require_once 'CcMusicDirsQuery.php';
|
||||
#require_once 'BaseCcMusicDirsQuery.php';
|
||||
|
||||
class StorageQuotaUpgrade
|
||||
{
|
||||
public static function startUpgrade()
|
||||
|
@ -35,10 +11,10 @@ class StorageQuotaUpgrade
|
|||
private static function setStorageUsage()
|
||||
{
|
||||
$musicDir = CcMusicDirsQuery::create()
|
||||
->filterByDbType('stor')
|
||||
->filterByDbExists(true)
|
||||
->filterByType('stor')
|
||||
->filterByExists(true)
|
||||
->findOne();
|
||||
$storPath = $musicDir->getDbDirectory();
|
||||
$storPath = $musicDir->getDirectory();
|
||||
|
||||
$freeSpace = disk_free_space($storPath);
|
||||
$totalSpace = disk_total_space($storPath);
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<?php
|
||||
|
||||
// Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/../airtime_mvc/application'));
|
||||
//include index.php so we can use propel classes
|
||||
require_once APPLICATION_PATH.'/../public/index.php';
|
||||
|
||||
require_once 'DbUpgrade.php';
|
||||
require_once 'StorageQuotaUpgrade.php';
|
||||
|
||||
|
|
Loading…
Reference in New Issue