pgsql/migrations: fix dpkg default versionfmt

This commit is contained in:
Jimmy Zelinskie 2017-01-20 14:42:33 -05:00
parent 84e4873768
commit 224ff82543

View File

@ -22,7 +22,7 @@ func init() {
Up: migrate.Queries([]string{ Up: migrate.Queries([]string{
`ALTER TABLE Namespace ADD COLUMN version_format varchar(128);`, `ALTER TABLE Namespace ADD COLUMN version_format varchar(128);`,
`UPDATE Namespace SET version_format = 'rpm' WHERE name LIKE 'rhel%' OR name LIKE 'centos%' OR name LIKE 'fedora%' OR name LIKE 'amzn%' OR name LIKE 'scientific%' OR name LIKE 'ol%' OR name LIKE 'oracle%';`, `UPDATE Namespace SET version_format = 'rpm' WHERE name LIKE 'rhel%' OR name LIKE 'centos%' OR name LIKE 'fedora%' OR name LIKE 'amzn%' OR name LIKE 'scientific%' OR name LIKE 'ol%' OR name LIKE 'oracle%';`,
`UPDATE Namespace SET version_format = 'dpkg' WHERE version_format != 'rpm';`, `UPDATE Namespace SET version_format = 'dpkg' WHERE version_format is NULL;`,
}), }),
Down: migrate.Queries([]string{ Down: migrate.Queries([]string{
`ALTER TABLE Namespace DROP COLUMN version_format;`, `ALTER TABLE Namespace DROP COLUMN version_format;`,