diff --git a/CHANGELOG.md b/CHANGELOG.md index fe4fcaa8..ced9a5eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). +## [Unreleased] + +#### Added + +* *Nothing* + +#### Changed + +* *Nothing* + +#### Deprecated + +* *Nothing* + +#### Removed + +* *Nothing* + +#### Fixed + +* [#700](https://github.com/shlinkio/shlink/issues/700) Fixed migration not working with postgres. + + ## 2.1.1 - 2020-03-28 #### Added diff --git a/data/migrations/Version20200323190014.php b/data/migrations/Version20200323190014.php index fe3c340d..47cf402a 100644 --- a/data/migrations/Version20200323190014.php +++ b/data/migrations/Version20200323190014.php @@ -22,15 +22,16 @@ final class Version20200323190014 extends AbstractMigration { $qb = $this->connection->createQueryBuilder(); $qb->update('visit_locations') - ->set('is_empty', true) - ->where($qb->expr()->eq('country_code', ':empty')) - ->andWhere($qb->expr()->eq('country_name', ':empty')) - ->andWhere($qb->expr()->eq('region_name', ':empty')) - ->andWhere($qb->expr()->eq('city_name', ':empty')) - ->andWhere($qb->expr()->eq('timezone', ':empty')) + ->set('is_empty', ':isEmpty') + ->where($qb->expr()->eq('country_code', ':emptyString')) + ->andWhere($qb->expr()->eq('country_name', ':emptyString')) + ->andWhere($qb->expr()->eq('region_name', ':emptyString')) + ->andWhere($qb->expr()->eq('city_name', ':emptyString')) + ->andWhere($qb->expr()->eq('timezone', ':emptyString')) ->andWhere($qb->expr()->eq('lat', 0)) ->andWhere($qb->expr()->eq('lon', 0)) - ->setParameter('empty', '') + ->setParameter('isEmpty', true) + ->setParameter('emptyString', '') ->execute(); }