fixed some issues and added label and, or capability
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/// PocketBase migration: label_match (AND/OR) on home_filter_widgets.
|
||||
migrate((app) => {
|
||||
const col = app.findCollectionByNameOrId("home_filter_widgets");
|
||||
if (col.fields.getByName("label_match")) return;
|
||||
|
||||
col.fields.add(new Field({
|
||||
type: "text",
|
||||
name: "label_match",
|
||||
required: false,
|
||||
max: 16,
|
||||
}));
|
||||
app.save(col);
|
||||
}, (app) => {
|
||||
try {
|
||||
const col = app.findCollectionByNameOrId("home_filter_widgets");
|
||||
const field = col.fields.getByName("label_match");
|
||||
if (field) {
|
||||
col.fields.removeById(field.id);
|
||||
app.save(col);
|
||||
}
|
||||
} catch (_) {}
|
||||
});
|
||||
Reference in New Issue
Block a user