|
|
|
@ -10,6 +10,7 @@ import { UITypes } from 'nocodb-sdk';
|
|
|
|
|
// changes:
|
|
|
|
|
// - remove `>`, `<`, `>=`, `<=` for text-based columns
|
|
|
|
|
// - remove `like`, `null`, and `empty` for numeric-based columns - migrate to `blank` from `null` and `empty`
|
|
|
|
|
// - remove `is null`, `is not null` for checkbox columns - migrate `equal` and `not equal` to `checked` and `not checked`
|
|
|
|
|
|
|
|
|
|
export default async function ({ ncMeta }: NcUpgraderCtx) { |
|
|
|
|
const filters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP); |
|
|
|
@ -58,6 +59,13 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
|
|
|
|
|
actions.push(await Filter.delete(filter, ncMeta)); |
|
|
|
|
// TODO: migrate to blank / not blank
|
|
|
|
|
} |
|
|
|
|
} else if (col.uidt === UITypes.Checkbox) { |
|
|
|
|
if (['eq', 'neq'].includes(filter.comparison_op)) { |
|
|
|
|
// TODO: migrate to `checked` or `not-checked`
|
|
|
|
|
} else if (['null', 'notnull'].includes(filter.comparison_op)) { |
|
|
|
|
// remove `is null`, `is not null`
|
|
|
|
|
actions.push(await Filter.delete(filter, ncMeta)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
await Promise.all(actions); |
|
|
|
|