Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: d187c4c7b337b2454f8b61d4357a14ca61dee29d https://github.com/openSUSE/open-build-service/commit/d187c4c7b337b2454f8b61... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-04 (Wed, 04 Apr 2018) Changed paths: M src/api/spec/support/database_cleaner.rb Log Message: ----------- [ci] Use truncation strategy for migration tests this is necessary when Mysql DDE statements (create/drop/truncate table) are used because these are not supported by transaction strategy otherwise it will raise an 'ActiveRecord::StatementInvalid: Mysql2::Error: SAVEPOINT active_record_1 does not exist: ROLLBACK TO SAVEPOINT active_record_1' exception. https://stackoverflow.com/questions/13161394/activerecord-error-savepoint-ac... Commit: b288c877d14ac7183064967db932371883652bd2 https://github.com/openSUSE/open-build-service/commit/b288c877d14ac718306496... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-04 (Wed, 04 Apr 2018) Changed paths: A src/api/db/data/20170306084550_remove_duplicate_repositories.rb M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb M src/api/db/structure.sql A src/api/spec/db/data/remove_duplicate_repositories_spec.rb Log Message: ----------- [webui][api] Fix ChangeRepositoriesRemoteProjectNameToNotNull migration The migration ChangeRepositoriesRemoteProjectNameToNotNull changes the default of remote_project_name to '' instead of NULL. This was necessary in order to make the combination of remote_project_name, db_project_id and name unique because MySQL does not consider rows with same column content but one NULL value as equal. The migration back then was removing duplicates, however, it also migrated repositories which are associated with remote projects. These repositories do not need to get migrated as they're anyway unique (there can not be a NULL value for these repositories). This commit splits this migration in a schema and a data migration and introduces specs for the data migration. The data migration gets changed to NOT migrate repositories of a remote project. If there is duplicate repository found, we simply destroy it as the data is already inconsistent and it is not possible to do a full migration. Fix #4761. Commit: 3bcce2c6c1dca838ca1121ae61831e5c0942febe https://github.com/openSUSE/open-build-service/commit/3bcce2c6c1dca838ca1121... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: A src/api/db/data/20170306084550_remove_duplicate_repositories.rb M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb M src/api/db/structure.sql A src/api/spec/db/data/remove_duplicate_repositories_spec.rb M src/api/spec/support/database_cleaner.rb Log Message: ----------- Merge pull request #4800 from ChrisBr/fix/dup-repos [webui][api] Fix ChangeRepositoriesRemoteProjectNameToNotNull migration Compare: https://github.com/openSUSE/open-build-service/compare/5068ad4f75b9...3bcce2...