Fixing installation process. Moving migrations folder inside app

1.10.x
Julio Montoya 9 years ago
parent c5e59d0ca8
commit e2ecc72ddd
  1. 4
      app/Migrations/Schema/V110/Version110.php
  2. 4
      app/Migrations/Schema/V110/Version20150423093100.php
  3. 4
      app/Migrations/Schema/V110/Version20150504182600.php
  4. 2
      app/Migrations/Schema/V110/Version20150505132304.php
  5. 4
      app/Migrations/Schema/V110/Version20150505142900.php
  6. 4
      app/Migrations/Schema/V110/Version20150507152600.php
  7. 2
      app/Migrations/Schema/V110/Version20150511133949.php
  8. 2
      app/Migrations/Schema/V110/Version20150521113600.php
  9. 2
      app/Migrations/Schema/V110/Version20150522112023.php
  10. 4
      app/Migrations/Schema/V110/Version20150522222222.php
  11. 5
      app/Migrations/Schema/V110/Version20150527101600.php
  12. 4
      app/Migrations/Schema/V110/Version20150527114220.php
  13. 4
      app/Migrations/Schema/V110/Version20150527120703.php
  14. 2
      app/Migrations/Schema/V110/Version20150528103216.php
  15. 2
      app/Migrations/Schema/V110/Version20150603142550.php
  16. 2
      app/Migrations/Schema/V110/Version20150603181728.php
  17. 2
      app/Migrations/Schema/V110/Version20150604145047.php
  18. 2
      app/Migrations/Schema/V110/Version20150608104600.php
  19. 2
      app/Migrations/Schema/V110/Version20150609113500.php
  20. 2
      app/Migrations/Schema/V110/Version20150610143426.php
  21. 3
      app/Migrations/Schema/V110/Version20150615171900.php
  22. 2
      app/Migrations/Schema/V110/Version20150616093200.php
  23. 2
      app/Migrations/Schema/V110/Version20150624164100.php
  24. 2
      app/Migrations/Schema/V110/Version20150625155000.php
  25. 2
      app/Migrations/Schema/V110/Version20150706135000.php
  26. 2
      app/Migrations/Schema/V110/Version20150709083710.php
  27. 4
      app/Migrations/Schema/V110/Version20150713132630.php
  28. 3
      app/Migrations/Schema/V111/Version111.php
  29. 4
      app/config/migrations.yml
  30. 1
      main/admin/special_exports.php
  31. 4
      main/install/install.lib.php
  32. 53
      src/Chamilo/CoreBundle/Composer/ScriptHandler.php

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -11,7 +11,7 @@ use Doctrine\DBAL\Schema\Schema;
*
* Migrate file to updated to Chamilo 1.10
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
* @package Application\Migrations\Schema\V110
*/
class Version110 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -9,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150423093100
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
* @package Application\Migrations\Schema\V110
*/
class Version20150423093100 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -9,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150504182600
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
* @package Application\Migrations\Schema\V110
*/
class Version20150504182600 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Entity\ExtraField;
use Chamilo\CoreBundle\Entity\ExtraFieldOptions;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -10,7 +10,7 @@ use Doctrine\DBAL\Types\Type;
/**
* Class Version20150505142900
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
* @package Application\Migrations\Schema\V110
*/
class Version20150505142900 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -9,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150507152600
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
* @package Application\Migrations\Schema\V110
*/
class Version20150507152600 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,14 +1,14 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150522222222
* @package Chamilo\CoreBundle\Migrations\Schema\V110
* @package Application\Migrations\Schema\V11010
*/
class Version20150522222222 extends AbstractMigrationChamilo
{

@ -1,6 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -8,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150527120703
* LP autolunch -> autolaunch
* @package Chamilo\CoreBundle\Migrations\Schema\V110
* @package Application\Migrations\Schema\V11010
*/
class Version20150527101600 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -9,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150527114220
* Lp category
* @package Chamilo\CoreBundle\Migrations\Schema\V110
* @package Application\Migrations\Schema\V11010
*/
class Version20150527114220 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -9,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150527120703
* LP autolunch -> autolaunch
* @package Chamilo\CoreBundle\Migrations\Schema\V110
* @package Application\Migrations\Schema\V11010
*/
class Version20150527120703 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,6 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V110;
namespace Application\Migrations\Schema\V110;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -9,7 +9,7 @@ use Doctrine\DBAL\Schema\Schema;
/**
* Class Version20150713132630
*
* @package Chamilo\CoreBundle\Migrations\Schema\V110
* @package Application\Migrations\Schema\V11010
*/
class Version20150713132630 extends AbstractMigrationChamilo
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Migrations\Schema\V111;
namespace Application\Migrations\Schema\V111;
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
use Doctrine\DBAL\Schema\Schema;
@ -10,7 +10,6 @@ use Doctrine\DBAL\Schema\Schema;
* Class Version111
* Migrate file to updated to Chamilo 1.11
*
* @package Chamilo\CoreBundle\Migrations\Schema\v1
*/
class Version111 extends AbstractMigrationChamilo
{

@ -1,4 +1,4 @@
name: Chamilo Migrations
migrations_namespace: Chamilo\CoreBundle\Migrations\Schema\V110
migrations_namespace: Application\Migrations\Schema\V110
table_name: version
migrations_directory: src/Chamilo/CoreBundle/Migrations/Schema/V110
migrations_directory: app/Migrations/Schema/V110

@ -19,6 +19,7 @@ $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAd
// Access restrictions
api_protect_admin_script(true);
$nameTools = get_lang('SpecialExports');
$export = '';
// include additional libraries
require_once '../coursecopy/classes/CourseBuilder.class.php';

@ -1901,9 +1901,9 @@ function migrate($chamiloVersion, EntityManager $manager)
// default name is: doctrine_migration_versions)
$config->setMigrationsTableName('version');
// Namespace of your migration classes, do not forget escape slashes, do not add last slash
$config->setMigrationsNamespace('Chamilo\CoreBundle\Migrations\Schema\V'.$chamiloVersion);
$config->setMigrationsNamespace('Application\Migrations\Schema\V'.$chamiloVersion);
// Directory where your migrations are located
$config->setMigrationsDirectory(api_get_path(SYS_PATH).'src/Chamilo/CoreBundle/Migrations/Schema/V'.$chamiloVersion);
$config->setMigrationsDirectory(api_get_path(SYS_PATH).'app/Migrations/Schema/V'.$chamiloVersion);
// Load your migrations
$config->registerMigrationsFromDirectory($config->getMigrationsDirectory());

@ -28,7 +28,58 @@ class ScriptHandler
{
$path = __DIR__.'/../../../../main/inc/lib/symfony/';
if (is_dir($path) && is_writable($path)) {
rmdir($path);
self::rmdirr($path);
}
}
private static function rmdirr($dirname, $delete_only_content_in_folder = false, $strict = false)
{
$res = true;
// A sanity check.
if (!file_exists($dirname)) {
return false;
}
// Simple delete for a file.
if (is_file($dirname) || is_link($dirname)) {
$res = unlink($dirname);
return $res;
}
// Loop through the folder.
$dir = dir($dirname);
// A sanity check.
$is_object_dir = is_object($dir);
if ($is_object_dir) {
while (false !== $entry = $dir->read()) {
// Skip pointers.
if ($entry == '.' || $entry == '..') {
continue;
}
// Recurse.
if ($strict) {
$result = self::rmdirr("$dirname/$entry");
if ($result == false) {
$res = false;
break;
}
} else {
self::rmdirr("$dirname/$entry");
}
}
}
// Clean up.
if ($is_object_dir) {
$dir->close();
}
if ($delete_only_content_in_folder == false) {
$res = rmdir($dirname);
}
return $res;
}
}

Loading…
Cancel
Save