CC-3421: Upgrade Script: add/enhance upgrade script for network drive files handler feature
- bug fix
This commit is contained in:
parent
416b9d1dc2
commit
632b1c40ec
|
@ -111,6 +111,10 @@ if (strcmp($version, "2.0.2") < 0){
|
|||
passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.0.2/airtime-upgrade.php");
|
||||
pause();
|
||||
}
|
||||
if (strcmp($version, "2.1.0") < 0){
|
||||
passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-2.1.0/airtime-upgrade.php");
|
||||
pause();
|
||||
}
|
||||
|
||||
//set the new version in the database.
|
||||
$sql = "DELETE FROM cc_pref WHERE keystr = 'system_version'";
|
||||
|
|
|
@ -59,7 +59,7 @@ class UpgradeCommon{
|
|||
|
||||
private static function GetAirtimeSrcDir()
|
||||
{
|
||||
return __DIR__."/../../../airtime_mvc";
|
||||
return __DIR__."/../../../../airtime_mvc";
|
||||
}
|
||||
|
||||
public static function MigrateTablesToVersion($dir, $version)
|
||||
|
@ -69,7 +69,7 @@ class UpgradeCommon{
|
|||
$appDir = self::GetAirtimeSrcDir();
|
||||
$command = "php --php-ini $dir/../../airtime-php.ini ".
|
||||
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ".
|
||||
"--configuration=$dir/migrations.xml ".
|
||||
"--configuration=$dir/common/migrations.xml ".
|
||||
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
|
||||
"--no-interaction migrations:migrate $version";
|
||||
system($command);
|
||||
|
@ -80,7 +80,7 @@ class UpgradeCommon{
|
|||
$appDir = self::GetAirtimeSrcDir();
|
||||
$command = "php --php-ini $dir/../../airtime-php.ini ".
|
||||
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ".
|
||||
"--configuration=$dir/migrations.xml ".
|
||||
"--configuration=$dir/common/migrations.xml ".
|
||||
"--db-configuration=$appDir/library/doctrine/migrations/migrations-db.php ".
|
||||
"--no-interaction --add migrations:version $version";
|
||||
system($command);
|
||||
|
@ -122,19 +122,19 @@ class UpgradeCommon{
|
|||
}
|
||||
}
|
||||
|
||||
if (!copy(__DIR__."../etc/airtime.conf.$suffix", self::CONF_FILE_AIRTIME)){
|
||||
if (!copy(__DIR__."/../etc/airtime.conf.$suffix", self::CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."../etc/pypo.cfg.$suffix", self::CONF_FILE_PYPO)){
|
||||
if (!copy(__DIR__."/../etc/pypo.cfg.$suffix", self::CONF_FILE_PYPO)){
|
||||
echo "Could not copy pypo.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."../etc/media-monitor.cfg.$suffix", self::CONF_FILE_MEDIAMONITOR)){
|
||||
if (!copy(__DIR__."/../etc/media-monitor.cfg.$suffix", self::CONF_FILE_MEDIAMONITOR)){
|
||||
echo "Could not copy meadia-monitor.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy(__DIR__."../etc/api_client.cfg.$suffix", self::CONF_FILE_API_CLIENT)){
|
||||
if (!copy(__DIR__."/../etc/api_client.cfg.$suffix", self::CONF_FILE_API_CLIENT)){
|
||||
echo "Could not copy api_client.cfg to /etc/monit/conf.d/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ class Version20120402103944 extends AbstractMigration
|
|||
$cc_files = $schema->getTable('cc_files');
|
||||
$cc_files->addColumn('file_exists', 'boolean', array('default'=> 'true'));
|
||||
|
||||
$this->dropForeignKey('cc_files', 'cc_music_dirs_folder_fkey');
|
||||
//$cc_files->removeForeignKey('cc_music_dirs_folder_fkey');
|
||||
$cc_files->addNamedForeignKeyConstraint('cc_music_dirs_folder_fkey', $cc_music_dirs, array('directory'), array('id'));
|
||||
$cc_files->addIndex('file_exists', 'cc_files_file_exists_idx');
|
||||
$cc_files->addIndex(array('file_exists'), 'cc_files_file_exists_idx');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
|
|
Loading…
Reference in New Issue