Project

General

Profile

Feature #7935

Migration from 1.10.x to 2.0 [master]

Added by Angel Quiroz over 3 years ago. Updated about 3 years ago.

Status:
Needs testing
Priority:
Normal
Assignee:
-
Category:
Database & API changes
Target version:
Start date:
02/11/2015
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

The migrations directory V20 exists and the migrations.yml, but what is the way to update the database schema?


Files

error2.0.png (113 KB) error2.0.png José Loguercio, 05/01/2016 17:08

Related issues

Related to Chamilo LMS - Feature #7920: Replace $_SESSION variables with class Session [master]New27/10/2015

Actions
Related to Chamilo LMS - Feature #7943: Chamilo 2.0 Translations [master]New05/11/2015

Actions
Related to Chamilo LMS - Feature #7950: New platform settings [master]New06/11/2015

Actions
Related to Chamilo LMS - Feature #7944: Chamilo 2.0 New style elements [master]Needs more info05/11/2015

Actions
Related to Chamilo LMS - Feature #7951: Integrar LESS o SASS en Chamilo [master]Assigned09/11/2015

Actions
Related to Chamilo LMS - Feature #1244: Change all course literal codes to course integer ID'sNeeds testing05/05/2010

Actions
Related to Chamilo LMS - Feature #8015: Manage resourcesNew23/12/2015

Actions
Related to Chamilo LMS - Feature #7257: Split c_item_property into c_item_property and c_item_property_logAssigned02/09/2014

Actions

History

#1

Updated by Julio Montoya over 3 years ago

Is too soon to do an upgrade from 1.10 to 2.0
I suggest for the moment make a fresh installation of 2.0 doing:

1. Chamilo 2.0 Fresh installation

0. Install dependencies:

- Install bower in your system: http://bower.io/ (bower install js libs like composer)
- Install yui-compressor sudo apt-get install yui-compressor (in order to compress css files when doing assetic:dump)
- Clone the master chamilo branch

1. Run composer:
Complete the dialog (database name, database password, etc)

   composer update
   app/console assets:install
   app/console assetic:dump
   

2. Check permisions in app/cache/ app/log web/ chmod -R 777
3. Create database manually (mysql)
4. Install the platform using the browser using /web/install.php (fix warnings: php extensions, permissions)
5. Follow the wizard
6. After installation is successful enter here: web/app_dev.php

2. You manage to install Chamilo now. Now you want to make a re installation:

1. git checkout master -f (make sure you commit your changes before)
2. git pull
3. drop database and create database manually
4. Update the file app/config/parameters.yml and set:

 installed: ''

3. Run commands:

   composer update
   app/console assets:install
   app/console assetic:dump   

4. Check permissions 777 in log and cache

5. Install Chamilo using the web/install.php file

3. Add a new js/css library

1. Add the lib dependency here:

src/Chamilo/ThemeBundle/Resources/config/bower/bower.json

2. Run app/console sp:bower:install

The js and css files will be saved here:

src/Chamilo/ThemeBundle/Resources/public/components

4. Run app/console assets:install

Files will be copied here:

web/bundles/chamilotheme/components/

5. If you want this js/css lib to be added in all chamilo files you have to edit the assetic.yml file here:

app/config/assetic.yml

Example:

chamilo_css:
            inputs:
                - bundles/chamilotheme/components/new_library/dist/css/css.css
chamilo_js:
            inputs:
                - bundles/chamilotheme/components/new_library/dist/js.js

6. Run app/console assetic:dump

7. Commit the new files added here:

src/Chamilo/ThemeBundle/Resources/public/components

8. The new library will be added in chamilo:

js/chamilo.css
js/chamilo.js

You need to clear your browser cache (ctrl f5 in browser) and symfony2 cache:

app/console cache:clear
#2

Updated by Julio Montoya over 3 years ago

Si hay errores revisar el error log de apache o si no aqui:

app/logs/chamilo_install.log
app/logs/dev.log
#3

Updated by Julio Montoya over 3 years ago

Si se quiere volver a reinstalar la plataforma entonces:

1. Eliminar base de datos manualmente

2. Poner a vacio el valor de "installed" aqui:

# app/config/parameters.yml
parameters:
    installed: ''

Y luego volver entrar a web/install.php

#4

Updated by Julio Montoya over 3 years ago

Si hay un problema con los estilos ejecutar:

 app/console sp:bower:install

Y luego un composer update

#5

Updated by Julio Montoya over 3 years ago

Comentario 1 actualizado con assetic:dump

#6

Updated by Angel Quiroz over 3 years ago

I have a problem with bower (sudo npm install -g bower -> Bower installed: 1.6.5),

Installing bower dependencies for "ChamiloThemeBundle" into "/var/www/chamilo110x/src/Chamilo/ThemeBundle/Resources/config/bower/../../public/components" 
sh: 1: /usr/bin/bower: not found

#7

Updated by Julio Montoya over 3 years ago

Angel Quiroz wrote:

I have a problem with bower (sudo npm install -g bower -> Bower installed: 1.6.5),
[...]

Corregido agregando un valor en la config:

parameters:
    sp_bower_bin: '/usr/bin/bower'

#8

Updated by Julio Montoya over 3 years ago

"Create database manually" agregado en los pasos

#9

Updated by Julio Montoya over 3 years ago

  • Subject changed from Migration from 1.10.x to 2.0 to Migration from 1.10.x to 2.0 [master]
  • Status changed from Assigned to Needs testing
  • Assignee deleted (Julio Montoya)

Espero dudas/problemas encontrados/sugerencias ...

#10

Updated by Angel Quiroz over 3 years ago

Qué tengo que poner en jjanvier_crowdin dentro de parameters.yml?

#11

Updated by Julio Montoya over 3 years ago

Angel Quiroz wrote:

Qué tengo que poner en jjanvier_crowdin dentro de parameters.yml?

por ahora nada, es un bundle para manejar las traducciones usando crowdin.com

#12

Updated by José Loguercio over 3 years ago

He tratado de reinstalarlo pero me sale esto :

TableNotFoundException in AbstractMySQLDriver.php line 53: An exception occurred while executing 'SELECT id, url, description, active, created_by, tms
FROM access_url
ORDER BY url ASC
LIMIT 1000000 OFFSET 0':

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'chamilonew.access_url' doesn't exist

desde aquí como puedo obtener de nuevo una instalación limpia? (intenté lo descrito en el primer y segundo comentario)

#13

Updated by Julio Montoya over 3 years ago

José Loguercio wrote:

He tratado de reinstalarlo pero me sale esto :

TableNotFoundException in AbstractMySQLDriver.php line 53: An exception occurred while executing 'SELECT id, url, description, active, created_by, tms
FROM access_url
ORDER BY url ASC
LIMIT 1000000 OFFSET 0':

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'chamilonew.access_url' doesn't exist

desde aquí como puedo obtener de nuevo una instalación limpia? (intenté lo descrito en el primer y segundo comentario)

Acabo de corregirlo. Ahora debería de funcionar.

#14

Updated by José Loguercio about 3 years ago

After do a pull upstream master to update to the last version, i got this error :

Fatal error: Class 'Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle' not found in /var/www/master/app/AppKernel.php on line 27

#15

Updated by Julio Montoya about 3 years ago

José Loguercio wrote:

After do a pull upstream master to update to the last version, i got this error :

Fatal error: Class 'Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle' not found in /var/www/master/app/AppKernel.php on line 27

you tried using composer update? :)

#16

Updated by José Loguercio about 3 years ago

After the composer update :

Warning: require(/var/www/master/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs/functions.php): failed to open stream: No such file or directory in /var/www/master/vendor/composer/autoload_real.php on line 55

:(

#17

Updated by Angel Quiroz about 3 years ago

Estoy intentando instalar master
Pero obtengo este error


> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

  [Symfony\Component\Config\Definition\Exception\InvalidTypeException]                     
  Invalid type for path "lunetics_locale.allowed_locales". Expected array, but got string  

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception

  [RuntimeException]                                                                           
  An error occurred when executing the "'cache:clear --no-warmup'" command:                    

    [Symfony\Component\Config\Definition\Exception\InvalidTypeException]                       
    Invalid type for path "lunetics_locale.allowed_locales". Expected array, but got string    

  .                                                                                            

#18

Updated by Angel Quiroz about 3 years ago

Angel Quiroz wrote:

Estoy intentando instalar master
Pero obtengo este error

[...]

Ya lo solucioné.
Era un problema en parameters.yml. Por no tener

    locales:
        - en
        - fr
        - es

#19

Updated by Angel Quiroz about 3 years ago

Ahora tengo otro erro al hacer app/console assetic:dump


[Assetic\Exception\FilterException]                                                                                                                                  
  An error occurred while running:                                                                                                                                     
  '/usr/bin/java' '-jar' '/var/www/chamilo20x/app/../bin/yuicompressor.jar' '--charset' 'UTF-8' '-o' '/tmp/assetic_yui_output7jRRHU' '--type' 'js' '/tmp/assetic_yui_  
  inputOO5ZIr'                                                                                                                                                         
  Error Output:                                                                                                                                                        
  Error: Unable to access jarfile /var/www/chamilo20x/app/../bin/yuicompressor.jar

#20

Updated by Julio Montoya about 3 years ago

Angel Quiroz wrote:

Ahora tengo otro erro al hacer app/console assetic:dump

Normally you need to install yui-compressor to compress js and css files. I just commented that part of the code with:

https://github.com/chamilo/chamilo-lms/commit/3fbae870a601e634e4495b3a964577697e538fb6

Now, there should be no error.

#21

Updated by Angel Quiroz about 3 years ago

Julio Montoya wrote:

Angel Quiroz wrote:

Ahora tengo otro erro al hacer app/console assetic:dump

Normally you need to install yui-compressor to compress js and css files. I just commented that part of the code with:

https://github.com/chamilo/chamilo-lms/commit/3fbae870a601e634e4495b3a964577697e538fb6

Now, there should be no error.

... and finally installed :-)

#22

Updated by Angel Quiroz about 3 years ago

  • Assignee set to Julio Montoya

Julio, tengo un problema probando cambios de #1244
Había logrado instalar master pero cuando hice checkcout a mi rama C1244 para instalar de nuevo, no puedo instalar. Sólo cambié el campo installed de parameters.yml a ''. Luego en el instalador se queda el paso 3 Database initialization en la parte de Drop current schema.

Necesito hacer algo más?

También tenía problemas de dependencia con gregwar/captcha-bundle al hacer composer update, pero cambié la versión a @stable y logré instalarlo la primera vez.

#23

Updated by Angel Quiroz about 3 years ago

  • Assignee deleted (Julio Montoya)

Angel Quiroz wrote:

Julio, tengo un problema probando cambios de #1244
Había logrado instalar master pero cuando hice checkcout a mi rama C1244 para instalar de nuevo, no puedo instalar. Sólo cambié el campo installed de parameters.yml a ''. Luego en el instalador se queda el paso 3 Database initialization en la parte de Drop current schema.

Necesito hacer algo más?

También tenía problemas de dependencia con gregwar/captcha-bundle al hacer composer update, pero cambié la versión a @stable y logré instalarlo la primera vez.

Ya logré instalarlo :D

Also available in: Atom PDF