From 18ca13f30f4858a171e95a6d69a81029f502b800 Mon Sep 17 00:00:00 2001 From: Travis CI User Date: Mon, 30 Sep 2019 08:45:02 +0000 Subject: [PATCH 1/5] update locales from crowdin [ci skip] --- config/locales/crowdin/js-pt-BR.yml | 8 ++++---- modules/bcf/config/locales/crowdin/pt-BR.yml | 10 +++++----- modules/grids/config/locales/crowdin/js-pt-BR.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/locales/crowdin/js-pt-BR.yml b/config/locales/crowdin/js-pt-BR.yml index 67949953dd3..5a1a88487b7 100644 --- a/config/locales/crowdin/js-pt-BR.yml +++ b/config/locales/crowdin/js-pt-BR.yml @@ -41,7 +41,7 @@ pt-BR: button_open_details: "Abrir visão detalhada" button_close_details: "Fechar visão detalhada" button_open_fullscreen: "Abrir visualização em tela cheia" - button_show_cards: "Mostrar exibição de cartão" + button_show_cards: "Mostrar cartão" button_show_list: "Mostrar lista" button_quote: "Citar" button_save: "Salvar" @@ -573,9 +573,9 @@ pt-BR: work_packages: bulk_actions: move: 'Mudança em massa de projeto' - edit: 'Editar vários' - copy: 'Copiar vários' - delete: 'Excluir vários' + edit: 'Edição em massa' + copy: 'Cópia em massa' + delete: 'Exclusão em massa' button_clear: "Limpar" comment_added: "O comentário foi adicionado com sucesso." comment_send_failed: "Ocorreu um erro. Não foi possível enviar o comentário." diff --git a/modules/bcf/config/locales/crowdin/pt-BR.yml b/modules/bcf/config/locales/crowdin/pt-BR.yml index 93dd5bfa1d5..ee7ecb8276d 100644 --- a/modules/bcf/config/locales/crowdin/pt-BR.yml +++ b/modules/bcf/config/locales/crowdin/pt-BR.yml @@ -28,7 +28,7 @@ pt-BR: button_perform_import: 'Confirmar importação' button_proceed: 'Prosseguir' button_back_to_list: 'Voltar à lista' - no_permission_to_add_members: 'Você não tem permissões suficientes para adicioná-las como membros do projeto.' + no_permission_to_add_members: 'Você não tem permissões suficientes para adicioná-los como membros do projeto.' contact_project_admin: 'Contate seu administrador do projeto para adicioná-los como membros e iniciar esta importação novamente.' continue_anyways: 'Você quer prosseguir e concluir as consultas?' description: "Forneça um arquivo BCF-XML v2.1 para importar para este projeto. Você pode examinar seu conteúdo antes de realizar a importação." @@ -45,13 +45,13 @@ pt-BR: invite_as_members_with_role: 'Convide-os como membros para o projeto "%{project}" com papel' add_as_members_with_role: 'Adicione-os como membros do projeto "%{project}" com papel' no_type_provided: 'Nenhum tipo fornecido' - no_status_provided: 'Nenhum status informado' - no_priority_provided: 'Nenhuma prioridade informada' + no_status_provided: 'Nenhum status fornecido' + no_priority_provided: 'Nenhuma prioridade fornecida' perform_description: "Você quer importar ou atualizar os problemas listados acima?" replace_with_system_user: 'Substituir por usuário "Sistema"' - import_as_system_user: 'Importar-los como usuário "Sistema".' + import_as_system_user: 'Importá-los como usuário "Sistema".' what_to_do: "O que você quer fazer?" - work_package_has_newer_changes: "Atualizado! Este tópico não foi atualizado porque as últimas alterações no servidor foram mais recentes do que a \"Modificada\" do tópico importado. No entanto, os comentários ao tópico foram importados." + work_package_has_newer_changes: "Desatualizado! Este tópico não foi atualizado, pois as últimas alterações no servidor eram mais recentes que a \"Data de modificação\" do tópico importado. No entanto, os comentários ao tópico foram importados." export: format: bcf: "BCF-XML" diff --git a/modules/grids/config/locales/crowdin/js-pt-BR.yml b/modules/grids/config/locales/crowdin/js-pt-BR.yml index b95f1810dfa..7b6fe32d78b 100644 --- a/modules/grids/config/locales/crowdin/js-pt-BR.yml +++ b/modules/grids/config/locales/crowdin/js-pt-BR.yml @@ -24,7 +24,7 @@ pt-BR: no_results: 'Nada de novo para relatar.' project_description: title: 'Descrição do projeto' - no_results: "Nenhuma descrição foi escrita ainda. Uma pode ser fornecida nas 'Configurações de Projeto'." + no_results: "Nenhuma descrição foi escrita. Uma pode ser fornecida nas 'Configurações do Projeto'." project_details: title: 'Detalhes do projeto' no_results: 'Nenhum campo personalizado foi definido para projetos.' From 451eab63dc8a141970734613c3614ecfbad26901 Mon Sep 17 00:00:00 2001 From: Geoff Montel Date: Mon, 30 Sep 2019 20:54:10 +0200 Subject: [PATCH 2/5] Remove from documentation misleading traces of MySQL This commit can be considered Hotfix, as it covers documentation bugs. Since version stable/10, MySQL is not available anymore for installation. However, there are plenty of traces of MySQL on the documentation itself. The associated PR is still Requested for Comments and review, there is one unclear point: pertinence and format of the `DATABASE_URL` env variable. Maybe iterating to better explain globally the `openproject configure` se- -ction, all env var indexes with explanation and location of conf files. Tested and "compiled" successfully on my forked repo (Github display MD). --- .../development-environment-osx.md | 5 +- docs/installation/docker/README.md | 12 +- docs/installation/manual/README.md | 106 +----------------- docs/installation/packaged/0-preparation.md | 4 +- docs/installation/packaged/2-configuration.md | 2 +- docs/installation/packaged/4-faq.md | 2 +- docs/operations/backup/manual/backup.md | 24 +--- docs/operations/backup/packaged/backup.md | 19 +--- .../migrating/packaged/packaged-migrating.md | 3 +- docs/operations/upgrading/docker/upgrading.md | 6 + .../packaged/upgrade-guide-legacy.md | 27 +---- .../upgrading/packaged/upgrading.md | 9 +- 12 files changed, 31 insertions(+), 188 deletions(-) diff --git a/docs/development/development-environment-osx.md b/docs/development/development-environment-osx.md index bf1b77bfac2..787844d3aeb 100644 --- a/docs/development/development-environment-osx.md +++ b/docs/development/development-environment-osx.md @@ -3,7 +3,6 @@ To develop OpenProject a setup similar to that for using OpenProject in production is needed. This guide assumes that you have a Mac OS Xinstallation installation with administrative rights. -OpenProject will be installed with a PostgreSQL database. This guide will work analogous with a MySQL installation, though. **Please note**: This guide is NOT suitable for a production setup, but only for developing with it! @@ -55,7 +54,7 @@ You also need to install [bundler](https://github.com/bundler/bundler/), the rub ## Setup PostgreSQL database -Next, install a PostgreSQL database. If you wish to use a MySQL database instead and have installed one, skip these steps. +Next, install a PostgreSQL database. ```bash # Install postgres database @@ -163,8 +162,6 @@ test: database: openproject_test ``` -**NOTE:** If you want to use MySQL instead and have a database installed, simply use the MySQL section of the exemplary `database.yml.example` configuration file. - ## Finish the Installation of OpenProject Now, run the following tasks to migrate and seed the dev database, and prepare the test setup for running tests locally. diff --git a/docs/installation/docker/README.md b/docs/installation/docker/README.md index a9317f05eac..d89f90039e5 100644 --- a/docs/installation/docker/README.md +++ b/docs/installation/docker/README.md @@ -135,16 +135,10 @@ my/apache2/conf:/etc/apache2`. This would entirely replace the configuration we're using. -* Can I use an external (MySQL or PostgreSQL) database? +* Can I use an external PostgreSQL database? -Yes. You can simply pass a custom `DATABASE_URL` environment variable on the -command-line, which could point to an external database. You can even choose to -use MySQL instead of PostgreSQL if you wish. Here is how you would do it: - - docker run -d ... -e DATABASE_URL=mysql2://user:pass@host:port/dbname openproject/community:8 - -The container will make sure that the database gets the migrations and demo -data as well. +Yes. You can simply pass a custom DATABASE_URL` environment variable on the +command-line, which could point to an external database. * I don't want the all-in-one installation. Can I still use the image to launch a specific process? diff --git a/docs/installation/manual/README.md b/docs/installation/manual/README.md index 90c2cd6011e..07545871588 100644 --- a/docs/installation/manual/README.md +++ b/docs/installation/manual/README.md @@ -58,7 +58,7 @@ sudo passwd openproject #(enter desired password) ## Installation of PostgreSQL -We recommend you use PostgreSQL to serve OpenProject. We require PostgreSQL version of at least 9.5. Please check https://www.postgresql.org/download/ if your distributed package is too old. +PostgreSQL is from version 10 of OpenProject the only available database to serve OpenProject. The rationales are explained here: https://www.openproject.org/deprecating-mysql-support/ . We require PostgreSQL version of at least 9.5. Please check https://www.postgresql.org/download/ if your distributed package is too old. ```bash [root@host] apt-get install postgresql postgresql-contrib libpq-dev @@ -90,59 +90,6 @@ Lastly, exit the system user # You will be root again now. ``` -### Using MySQL instead - -We recommend against using MySQL. If you have to use MySQL instead, please ensure a version of >= 5.7 -(MariaDB version >= 10.2) as it supports special characters such as emojis (emoticons) out of the box. - -If your Linux distribution only provides older versions of MySQL it is worth considering -[adding MySQL as an `apt` source](https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/). - -Once you have your `apt` sources nicely set up install the packages. - -```bash -[root@host] apt-get install mysql-server libmysqlclient-dev mysql-client -``` - -During the installation you will be asked to set the root password. - - -We use the following command to open a `mysql` console and create -the OpenProject database. - -```bash -[root@host] mysql -uroot -p -``` - -You may replace the string `openproject` with the desired username and -database name. The password `my_password` should definitely be changed. - -**On MySQL version 5.7 (MariaDB 10.2) or greater (recommended)** - -```sql -mysql> CREATE DATABASE openproject CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -``` - -**On MySQL version 5.6 or older (not recommended)** - -(!!) No support for emojis (emoticons). See above! If you have to use -5.6 or older and you need to support special unicode characters you can -get there but we don't provide the instructions here as it would bloat -this manual. - -```sql -mysql> CREATE DATABASE openproject CHARACTER SET utf8; -``` - -**Continue For all MySQL versions** - -```sql -mysql> CREATE USER 'openproject'@'localhost' IDENTIFIED BY 'my_password'; -mysql> GRANT ALL PRIVILEGES ON openproject.* TO 'openproject'@'localhost'; -mysql> FLUSH PRIVILEGES; -mysql> QUIT -``` - ## Installation of Ruby The are several possibilities to install Ruby on your machine. We will @@ -209,8 +156,7 @@ with OpenProject. For more information, see https://github.com/opf/openproject. # Ensure rubygems is up-to-date for bundler 2 [openproject@host] gem update --system [openproject@host] gem install bundler -# Replace mysql with postgresql if you had to install MySQL -[openproject@host] bundle install --deployment --without mysql2 sqlite development test therubyracer docker +[openproject@host] bundle install --deployment --without sqlite development test therubyracer docker [openproject@host] npm install ``` @@ -237,54 +183,6 @@ production: password: openproject ``` -** MySQL installation: version 5.7 (MariaDB 10.2) or greater (recommended)** - -The encoding should be set to `utf8mb4` as we created the DB with that encoding -a few steps ago. - -```yaml -production: - adapter: mysql2 - database: openproject - host: localhost - username: openproject - password: my_password - encoding: utf8mb4 - -development: - adapter: mysql2 - database: openproject - host: localhost - username: openproject - password: my_password - encoding: utf8mb4 -``` - -**MySQL installation: version 5.6 or older (not recommended)** - -The encoding should be set to `utf8` as we created the DB with that encoding a -few steps ago. - -```yaml -production: - adapter: mysql2 - database: openproject - host: localhost - username: openproject - password: my_password - encoding: utf8 - -development: - adapter: mysql2 - database: openproject - host: localhost - username: openproject - password: my_password - encoding: utf8 -``` - -Next we configure email notifications (this example uses a gmail account) by creating the `configuration.yml` in config directory. - ```bash [openproject@host] cp config/configuration.yml.example config/configuration.yml ``` diff --git a/docs/installation/packaged/0-preparation.md b/docs/installation/packaged/0-preparation.md index 3bde8582ddc..24a065598d9 100644 --- a/docs/installation/packaged/0-preparation.md +++ b/docs/installation/packaged/0-preparation.md @@ -21,8 +21,8 @@ The package will set up: * Apache 2 (web server) – this component provides the external interface, handles SSL termination (if SSL is used) and distributes/forwards web requests to the Unicorn processes. -* MySQL (database management system) – this component is used to store and - retrieve data. We do support PostgreSQL as well, but it is not part of the automatic wizard. To configure this instead, see below. +* PostgreSQL (database management system) – this component is used to store and + retrieve data. * Unicorn (application server) – this component hosts the actual application. By default, there is two unicorn processes running in parallel on the app server machine. diff --git a/docs/installation/packaged/2-configuration.md b/docs/installation/packaged/2-configuration.md index f80791a5015..b3b682baaaf 100644 --- a/docs/installation/packaged/2-configuration.md +++ b/docs/installation/packaged/2-configuration.md @@ -286,7 +286,7 @@ You can list all of the environment variables accessible to the application by r sudo openproject config # this will return something like: - DATABASE_URL=mysql2://openproject:9ScapYA1MN7JQrPR7Wkmp7y99K6mRHGU@127.0.0.1:3306/openproject + DATABASE_URL=postgresql://openproject:9ScapYA1MN7JQrPR7Wkmp7y99K6mRHGU@127.0.0.1/openproject SECRET_TOKEN=c5aa99a90f9650404a885cf5ec7c28f7fe1379550bb811cb0b39058f9407eaa216b9b2b22d27f58fb15ac21adb3bd16494ebe89e39ec225ef4627db048a12530 ADMIN_EMAIL=mail@example.com EMAIL_DELIVERY_METHOD=smtp diff --git a/docs/installation/packaged/4-faq.md b/docs/installation/packaged/4-faq.md index edc45e6113a..359bb158ca0 100644 --- a/docs/installation/packaged/4-faq.md +++ b/docs/installation/packaged/4-faq.md @@ -28,7 +28,7 @@ Yes, but you will lose the ability to enable Git/SVN repository integration. Not ### Can I use MySQL instead of PostgreSQL? -OpenProject has traditionally supported both MySQL and PostgreSQL, but in order to optimize for performance and SQL functionality, it is unfeasible to support both DBMS that are becoming more and more disjunct when trying to use more modern SQL features. This shift has started some years ago when full-text search was added for PostgreSQL, but at the time MySQL did not yet support it - and as of yet many distributions still do not support MySQL 8 natively. +Briefly: no. OpenProject has traditionally supported both MySQL and PostgreSQL, but in order to optimize for performance and SQL functionality, it is unfeasible to support both DBMS that are becoming more and more disjunct when trying to use more modern SQL features. This shift has started some years ago when full-text search was added for PostgreSQL, but at the time MySQL did not yet support it - and as of yet many distributions still do not support MySQL 8 natively. This led us to the path of removing support in the upcoming stable releases of OpenProject in order to focus on these goals. [Please see our blog post on the matter for additional notes](https://www.openproject.org/deprecating-mysql-support/). diff --git a/docs/operations/backup/manual/backup.md b/docs/operations/backup/manual/backup.md index 1bcc9e7ef1f..66d57bbac45 100644 --- a/docs/operations/backup/manual/backup.md +++ b/docs/operations/backup/manual/backup.md @@ -12,7 +12,7 @@ Execute the following command in a shell in the directory where OpenProject is i RAILS_ENV=production bundle exec rake backup:database:create ``` -The command will create dump of your database which can be found at `OPENPROJECT_DIRECTORY/backup/openproject-production-db-.sql` (for MySQL) or `OPENPROJECT_DIRECTORY/backup/openproject-production-db-.backup` (for PostgreSQL). +The command will create dump of your database which can be found at `OPENPROJECT_DIRECTORY/backup/openproject-production-db-.backup`. Optionally, you can specify the path of the backup file. Therefore you have to replace the `/path/to/file.backup` with the path of your choice @@ -48,7 +48,7 @@ production: min_messages: warning ``` -Locate the database entry for your production database. If your adapter is postgresql, then you have a PostgreSQL database. If it is mysql2, you use a MySQL database. Now follow the steps for your database adapter. +Locate the database entry for your production database. #### PostgreSQL You can backup your PostgreSQL database with the `pg_dump` command and restore backups with the `pg_restore` command. (There might be other (and more convenient) tools, like pgAdmin, depending on your specific setup.) @@ -73,26 +73,6 @@ pg_restore --clean --no-owner --single-transaction Consult the man page of `pg_restore` for more advanced parameters, if necessary. -#### MySQL -You can backup your MySQL database for example with the mysqldump command and restore backups with the mysql command line client. (There might be other (and more convenient) tools, like phpMyAdmin, adminer, or other tools, depending on your specific setup.) - -An example backup command with `mysqldump` looks like this: - -```bash -mysqldump --single-transaction --add-drop-table --add-locks --result-file=/path/to/your/backup/file.sql --host=HOST --user=MYSQL_USER --password DATABASE_NAME -``` - -Please, replace the path to your backup file, the MySQL username, host and database name with your actual data. You can find all relevant information in the `database.yml` file. - -Consult the man page of `mysqldump` for more advanced parameters, if necessary. - -The database dump can be restored similarly with `mysql` (on a \*nix compatible shell): - -```bash -mysql --host=HOST --user=MYSQL_USER --password DATABASE_NAME < /path/to/your/backup/file.sql -``` -Consult the man page of mysql for more advanced parameters, if necessary. - ## Backup your Configuration Files Please make sure to create a backup copy of at least the following configuration files (all listed as a relative path from the OpenProject installation directory): diff --git a/docs/operations/backup/packaged/backup.md b/docs/operations/backup/packaged/backup.md index b1e0261b3af..7c420e5885b 100644 --- a/docs/operations/backup/packaged/backup.md +++ b/docs/operations/backup/packaged/backup.md @@ -30,14 +30,14 @@ The command will create backup files in the following location on your system /var/db/openproject/backup ``` -The content of that directory should look very similar to the following (depending on your used database, you will see either a `mysql-dump-.sql.gz` or a `postgresql-dump-` file). +The content of that directory should look very similar to the following (depending on your used database, you will see a postgresql-dump-` file). ```bash root@test-packager-backup:/opt/openproject# ls -l /var/db/openproject/backup/ total 24 -rw-r----- 1 openproject openproject 117 Apr 8 09:55 attachments-20150408095521.tar.gz -rw-r----- 1 openproject openproject 667 Apr 8 09:55 conf-20150408095521.tar.gz --rw-r----- 1 openproject openproject 8298 Apr 8 09:55 mysql-dump-20150408095521.sql.gz +-rw-r----- 1 openproject openproject 8298 Apr 8 09:55 postgresql-dump-20150408095521.sql.gz -rw-r----- 1 openproject openproject 116 Apr 8 09:55 svn-repositories-20150408095521.tar.gz ``` @@ -65,7 +65,7 @@ installation. This setting can be seen by running: ``` openproject config:get DATABASE_URL -#=> e.g.: mysql2://dbusername:dbpassword@dbhost:dbport/dbname +#=> e.g.: postgresql://dbusername:dbpassword@dbhost:dbport/dbname ``` @@ -84,16 +84,3 @@ pg_restore -h -u -W First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this: - -#### MySQL - - - -To restore the MySQL dump it is recommended to use the `mysql` command line client. - -First the dump has to be extracted (unzipped) and then restored. The command -used should look very similar to this: - -```bash -zcat mysql-dump-20150408095521.sql.gz | mysql -u -h -p -``` diff --git a/docs/operations/migrating/packaged/packaged-migrating.md b/docs/operations/migrating/packaged/packaged-migrating.md index 19d198a64d9..bd8f6ae64f4 100644 --- a/docs/operations/migrating/packaged/packaged-migrating.md +++ b/docs/operations/migrating/packaged/packaged-migrating.md @@ -10,7 +10,7 @@ To create a dump of all your data in the old installation, please follow our [ba This guide should leave you with a set of archives that you should manually move to your new environment: -- **Database**: mysql-dump-\.sql.gz or postgresql-dump\.pgdump +- **Database**: postgresql-dump\.pgdump - **Attachments**: attachments-\.tar.gz - **Custom env configuration**: conf-\.tar.gz - **Repositories**: svn- and git-\.tar.gz @@ -53,7 +53,6 @@ To read the values from the old installation, you can execute the following comm ```bash openproject config:get DATABASE_URL -#=> e.g.: mysql2://dbusername:dbpassword@dbhost:dbport/dbname ``` First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this: diff --git a/docs/operations/upgrading/docker/upgrading.md b/docs/operations/upgrading/docker/upgrading.md index cf6bde939b6..47a6b377890 100644 --- a/docs/operations/upgrading/docker/upgrading.md +++ b/docs/operations/upgrading/docker/upgrading.md @@ -17,6 +17,12 @@ This time, it will use the new image: # Upgrade Notes +## OpenProject 10.x + +### MySQL has been dropped from sources + +See below for further details. + ## OpenProject 9.x ### MySQL is being deprecated diff --git a/docs/operations/upgrading/packaged/upgrade-guide-legacy.md b/docs/operations/upgrading/packaged/upgrade-guide-legacy.md index 5690a3fc4dd..13dff73b26b 100644 --- a/docs/operations/upgrading/packaged/upgrade-guide-legacy.md +++ b/docs/operations/upgrading/packaged/upgrade-guide-legacy.md @@ -85,10 +85,6 @@ If you used autoinstall, the database name and database user name should equal ` sudo openproject-ce config:get DATABASE_URL -Which should output something of the form - - mysql2://:@127.0.0.1:3306/ - If the URI contains `openproject_ce` as the username and database name as the example above, we can simply continue. Otherwise, note user-, database name and password just to be sure. @@ -141,30 +137,19 @@ Add the package source to your package manager, update the sources, and install **Important:** Instead of running `openproject configure`, run `openproject reconfigure`, which will lead you through the complete wizard. -In the first step *mysql/autoinstall*, select the **reuse** option (Use an existing database). - -![](https://dl.dropboxusercontent.com/u/270758/op/mysql-reuse.png) - Press OK for the following steps, which will simply take the existing values from your old configuration - * MySQL IP or hostname - * MySQL port + * PostgreSQL IP or hostname + * PostgreSQL port -In the dialog `mysql/username`, enter `openproject_ce` if the Database URI from Step 4 contained it. If you chose a different user name in the original CE installation, it should already be set to this value. +In the dialog `postgresql/username`, enter `openproject_ce` if the Database URI from Step 4 contained it. If you chose a different user name in the original CE installation, it should already be set to this value. -![](https://dl.dropboxusercontent.com/u/270758/op/mysql-username.png) +In the dialog `postgresql/password`, **leave the password empty**. It will use the value from your original installation. You can optionally enter the password you retrieved from the database URI from Step 4, but that should be identical. -In the dialog `mysql/password`, **leave the password empty**. It will use the value from your original installation. You can optionally enter the password you retrieved from the database URI from Step 4, but that should be identical. +And again, in the `postgresql/db_name` step, enter `openproject_ce` if the Database URI from Step 4 contained it. If you chose a different database name in the original CE installation, it should already be set to this value. -![](https://dl.dropboxusercontent.com/u/270758/op/mysql-password.png) - -And again, in the `mysql/db_name` step, enter `openproject_ce` if the Database URI from Step 4 contained it. If you chose a different database name in the original CE installation, it should already be set to this value. - -The other installation steps (mysql/db_source_host, mysql/ssl) may again be skipped by pressing OK, as they should still contain the old values from the Community Edition. +The other installation steps may again be skipped by pressing OK, as they should still contain the old values from the Community Edition. There will be other new steps in the installation wizard for which we will provide additional information in the packager installation guide. Once the wizard has completed, the OpenProject instance should be updated to 6.0.x while re-using your existing database. - -**Note:** This last step is a workaround for the package upgrading process. We are working on making this step optional. -The workaround is necessary since since the package appname changed from `openproject-ce` to `openproject`, and the installer wizard automatically sets the database to the app name when selecting an automatic installation of MySQL. Instead, the updater should respect an existing database (user-) name in its configuration. diff --git a/docs/operations/upgrading/packaged/upgrading.md b/docs/operations/upgrading/packaged/upgrading.md index e534f04d27a..f45646e2396 100644 --- a/docs/operations/upgrading/packaged/upgrading.md +++ b/docs/operations/upgrading/packaged/upgrading.md @@ -10,7 +10,7 @@ running the `openproject configure` command. We try to ensure your upgrade path is as smooth as possible. This means that the below update + configure step should be the only change needed to get up to date with our packaged installation. -In the event of an error during the migrations, you will still want to have a recent backup you can restore to before reaching out to us. This is especially important for MySQL installations, since it does not support transactional migrations with changes to the table schema and you will have to rollback these changes manually. For PostgreSQL, if the Rails migrations fail, all previous changes will be rolled back for you to try again, or to install the older packages. +In the event of an error during the migrations, you will still want to have a recent backup you can restore to before reaching out to us. If the Rails migrations fails, all previous changes will be rolled back for you to try again, or to install the older packages. To perform a backup, run the following command @@ -67,12 +67,9 @@ The OpenProject community installation is now using the same repository as the O Please update your package source according to [our Download and Installation page](https://www.openproject.org/download-and-installation/). You will need to replace `opf/openproject-ce` with `opf/openproject` together with a change from `stable/8` to `stable/9` in order to perform the update. -### MySQL is being deprecated +### MySQL is deprecated -OpenProject 9.0. is deprecating MySQL support. You can expect full MySQL support for the course of 9.0 releases, but we -are likely going to be dropping MySQL completely in one of the following releases. - -For more information regarding motivation behind this and migration steps, please see https://www.openproject.org/deprecating-mysql-support/ +OpenProject 9.0. has deprecated MySQL support and intagration since version 10. For more information regarding motivation behind this and migration steps, please see https://www.openproject.org/deprecating-mysql-support/ In this post, you will find documentation for a mostly-automated migration script to PostgreSQL to help you get up and running with PostgreSQL. ## Upgrade steps From 16399b919c00c61f58e1868354663b87cafc2c83 Mon Sep 17 00:00:00 2001 From: ulferts Date: Fri, 27 Sep 2019 15:32:44 +0200 Subject: [PATCH 3/5] fix attachments deletion on rails pages --- .../wp-single-view/wp-single-view.html | 3 +- .../attachment-list-item.component.ts | 4 +- .../attachment-list.component.ts | 34 +++++++++++++- .../attachment-list/attachment-list.html | 2 +- .../attachments/attachments.component.ts | 44 +------------------ .../app/modules/attachments/attachments.html | 2 +- .../custom-text/custom-text.component.html | 1 - .../hal/resources/mixins/attachable-mixin.ts | 2 +- 8 files changed, 40 insertions(+), 52 deletions(-) diff --git a/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.html b/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.html index d2cb8c04e8f..cfe96ca04ee 100644 --- a/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.html +++ b/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.html @@ -133,8 +133,7 @@ + [ndcDynamicInputs]="{ resource: workPackage }"> (); @@ -112,7 +112,7 @@ export class AttachmentListItemComponent { this.removeAttachment.emit(); - if (!!this.selfDestroy) { + if (this.destroyImmediately) { this .resource .removeAttachment(this.attachment); diff --git a/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts b/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts index d1fd9de98a3..31b3e5bcdba 100644 --- a/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts +++ b/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts @@ -42,13 +42,15 @@ import {AngularTrackingHelpers} from "core-components/angular/tracking-functions }) export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { @Input() public resource:HalResource; - @Input() public selfDestroy:boolean = false; + @Input() public destroyImmediately:boolean = true; trackByHref = AngularTrackingHelpers.trackByHref; attachments:HalResource[] = []; + public initialAttachments:HalResource[]; public $element:JQuery; + public $formElement:JQuery; constructor(protected elementRef:ElementRef, protected states:States, @@ -64,6 +66,7 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { this.attachments = this.resource.attachments.elements; this.setupResourceUpdateListener(); + this.setupAttachmentDeletionCallback(); } public setupResourceUpdateListener() { @@ -81,7 +84,7 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { } ngOnDestroy():void { - // Nothing to do + this.$formElement.off('submit.attachment-component'); } ngOnChanges() { @@ -98,6 +101,33 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { private get attachmentsUpdatable() { return (this.resource.attachments && this.resource.attachmentsBackend); } + + public setupAttachmentDeletionCallback() { + this.memoizeCurrentAttachments(); + + this.$formElement = this.$element.closest('form'); + this.$formElement.on('submit.attachment-component', () => { + this.destroyRemovedAttachments(); + }); + } + + private destroyRemovedAttachments() { + let missingAttachments = _.differenceBy(this.initialAttachments, + this.attachments, + (attachment:HalResource) => attachment.id); + + if (missingAttachments.length) { + missingAttachments.forEach((attachment) => { + this + .resource + .removeAttachment(attachment); + }); + } + } + + private memoizeCurrentAttachments() { + this.initialAttachments = _.clone(this.resource.attachments.elements); + } } DynamicBootstrapper.register({ diff --git a/frontend/src/app/modules/attachments/attachment-list/attachment-list.html b/frontend/src/app/modules/attachments/attachment-list/attachment-list.html index ae07c84b778..bc4881ef742 100644 --- a/frontend/src/app/modules/attachments/attachment-list/attachment-list.html +++ b/frontend/src/app/modules/attachments/attachment-list/attachment-list.html @@ -4,7 +4,7 @@ diff --git a/frontend/src/app/modules/attachments/attachments.component.ts b/frontend/src/app/modules/attachments/attachments.component.ts index e33f41085b5..5128bbffe3f 100644 --- a/frontend/src/app/modules/attachments/attachments.component.ts +++ b/frontend/src/app/modules/attachments/attachments.component.ts @@ -42,14 +42,11 @@ import {filter, takeUntil} from 'rxjs/operators'; }) export class AttachmentsComponent implements OnInit, OnDestroy { @Input('resource') public resource:HalResource; - @Input() public selfDestroy:boolean = false; public $element:JQuery; public allowUploading:boolean; public destroyImmediately:boolean; public text:any; - public $formElement:JQuery; - public initialAttachments:HalResource[]; constructor(protected elementRef:ElementRef, protected I18n:I18nService, @@ -78,17 +75,11 @@ export class AttachmentsComponent implements OnInit, OnDestroy { this.destroyImmediately = true; } - this.setupAttachmentDeletionCallback(); this.setupResourceUpdateListener(); } - public setupAttachmentDeletionCallback() { - this.memoizeCurrentAttachments(); - - this.$formElement = this.$element.closest('form'); - this.$formElement.on('submit.attachment-component', () => { - this.destroyRemovedAttachments(); - }); + ngOnDestroy():void { + // nothing to do } public setupResourceUpdateListener() { @@ -99,45 +90,14 @@ export class AttachmentsComponent implements OnInit, OnDestroy { ) .subscribe((newResource:HalResource) => { this.resource = newResource || this.resource; - - if (this.destroyImmediately) { - this.destroyRemovedAttachments(); - this.memoizeCurrentAttachments(); - } }); } - ngOnDestroy() { - this.$formElement.off('submit.attachment-component'); - } - // Only show attachment list when allow uploading is set // or when at least one attachment exists public showAttachments() { return this.allowUploading || _.get(this.resource, 'attachments.count', 0) > 0; } - - private destroyRemovedAttachments() { - if (this.selfDestroy) { - return; - } - - let missingAttachments = _.differenceBy(this.initialAttachments, - this.resource.attachments.elements, - (attachment:HalResource) => attachment.id); - - if (missingAttachments.length) { - missingAttachments.forEach((attachment) => { - this - .resource - .removeAttachment(attachment); - }); - } - } - - private memoizeCurrentAttachments() { - this.initialAttachments = _.clone(this.resource.attachments.elements); - } } DynamicBootstrapper.register({ selector: 'attachments', cls: AttachmentsComponent, embeddable: true }); diff --git a/frontend/src/app/modules/attachments/attachments.html b/frontend/src/app/modules/attachments/attachments.html index 648c7d8968d..c521d159b36 100644 --- a/frontend/src/app/modules/attachments/attachments.html +++ b/frontend/src/app/modules/attachments/attachments.html @@ -5,7 +5,7 @@
+ [destroyImmediately]="destroyImmediately"> diff --git a/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts b/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts index b65b13c8fc7..7adbeb2c425 100644 --- a/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts +++ b/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts @@ -110,7 +110,7 @@ export function Attachable>(Base:TBase) { } /** - * Get updated attachments and activities from the server and push the state + * Get updated attachments from the server and push the state * * Return a promise that returns the attachments. Reject, if the work package has * no attachments. From 957af3bf436dc48253f2385dff42f1235c1dd1bd Mon Sep 17 00:00:00 2001 From: ulferts Date: Fri, 27 Sep 2019 15:42:04 +0200 Subject: [PATCH 4/5] wait for the attachments to be loaded before displaying the edit component --- .../grids/widgets/custom-text/custom-text.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts b/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts index e285a4dfd5e..1da78f24618 100644 --- a/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts +++ b/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts @@ -63,10 +63,11 @@ export class WidgetCustomTextComponent extends AbstractWidgetComponent implement return; } - // load the attachments so that they are displayed in the list; - this.resource.grid.updateAttachments(); - - this.handler.activate(); + // Load the attachments so that they are displayed in the list. + // Once that is done, we can show the edit form. + this.resource.grid.updateAttachments().then(() => { + this.handler.activate(); + }); } public get placeholderText() { From a7bde32b359cb093292784e374d5dcdcdea7496c Mon Sep 17 00:00:00 2001 From: ulferts Date: Fri, 27 Sep 2019 15:54:24 +0200 Subject: [PATCH 5/5] simplify deleted attachment detection --- .../attachment-list.component.ts | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts b/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts index 31b3e5bcdba..f8aae367b90 100644 --- a/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts +++ b/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts @@ -47,7 +47,7 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { trackByHref = AngularTrackingHelpers.trackByHref; attachments:HalResource[] = []; - public initialAttachments:HalResource[]; + deletedAttachments:HalResource[] = []; public $element:JQuery; public $formElement:JQuery; @@ -66,7 +66,10 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { this.attachments = this.resource.attachments.elements; this.setupResourceUpdateListener(); - this.setupAttachmentDeletionCallback(); + + if (!this.destroyImmediately) { + this.setupAttachmentDeletionCallback(); + } } public setupResourceUpdateListener() { @@ -84,7 +87,9 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { } ngOnDestroy():void { - this.$formElement.off('submit.attachment-component'); + if (!this.destroyImmediately) { + this.$formElement.off('submit.attachment-component'); + } } ngOnChanges() { @@ -94,6 +99,7 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { } public removeAttachment(attachment:HalResource) { + this.deletedAttachments.push(attachment); this.attachments = this.attachments.filter((el) => el !== attachment); this.cdRef.detectChanges(); } @@ -103,8 +109,6 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { } public setupAttachmentDeletionCallback() { - this.memoizeCurrentAttachments(); - this.$formElement = this.$element.closest('form'); this.$formElement.on('submit.attachment-component', () => { this.destroyRemovedAttachments(); @@ -112,21 +116,11 @@ export class AttachmentListComponent implements OnInit, OnChanges, OnDestroy { } private destroyRemovedAttachments() { - let missingAttachments = _.differenceBy(this.initialAttachments, - this.attachments, - (attachment:HalResource) => attachment.id); - - if (missingAttachments.length) { - missingAttachments.forEach((attachment) => { - this - .resource - .removeAttachment(attachment); - }); - } - } - - private memoizeCurrentAttachments() { - this.initialAttachments = _.clone(this.resource.attachments.elements); + this.deletedAttachments.forEach((attachment) => { + this + .resource + .removeAttachment(attachment); + }); } }