Adds 'type' property to migration of text-based segment rules

In v2, text-based segment rules need a "type" property. As in v1 the value could contain % wildcards, the default type for migrated rules should be 'like' to support them.
This commit is contained in:
Héctor 2019-02-17 18:45:35 +01:00 committed by GitHub
parent f7b5aef0e3
commit 433bf31bfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -528,7 +528,7 @@ async function migrateSegments(knex) {
case 'text':
case 'string':
case 'website':
rules.push({ column: oldRule.column, value: oldSettings.value });
rules.push({ type: 'like', column: oldRule.column, value: oldSettings.value });
break;
case 'number':
if (oldSettings.range) {