Browse Source

feat(nocodb): LinkToAnotherRecord filter upgrader logic

pull/5106/head
Wing-Kam Wong 2 years ago
parent
commit
209470e642
  1. 16
      packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader_0104003.ts

16
packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader_0104003.ts

@ -12,7 +12,7 @@ import { UITypes } from 'nocodb-sdk';
// - remove `like`, `null`, and `empty` for numeric-based / singleSelect 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`
// - remove `like`, `null`, `equal` and `empty` for multiSelect columns
// - remove `>`, `<`, `>=`, `<=`, `is empty`, `is not empty`, `is equal`, `is not equal` for attachment columns
// - remove `>`, `<`, `>=`, `<=`, `is empty`, `is not empty`, `is equal`, `is not equal` for attachment / LTAR columns
const removeEqualFilters = async (
filter,
@ -173,6 +173,20 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
ncMeta,
migrateToCheckboxFilter
);
} else if (col.uidt === UITypes.LinkToAnotherRecord) {
actions = await removeArithmeticFilters(filter, actions, ncMeta);
actions = await removeEmptyFilters(
filter,
actions,
ncMeta,
migrateToBlankFilter
);
actions = await removeNullFilters(
filter,
actions,
ncMeta,
migrateToBlankFilter
);
}
}
await Promise.all(actions);

Loading…
Cancel
Save