mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 04:00:57 +03:00
Merge pull request #701 from acelaya-forks/feature/fix-migration
Fixed query in migration for postgres
This commit is contained in:
commit
7105add009
2 changed files with 31 additions and 7 deletions
23
CHANGELOG.md
23
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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue