Changes all documents to have an explicit type
This commit is contained in:
25
pb_migrations/1751082429_updated_documents.js
Normal file
25
pb_migrations/1751082429_updated_documents.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_3332084752")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"indexes": [
|
||||
"CREATE INDEX `idx_gxNj5R3hxv` ON `documents` (`type`)",
|
||||
"CREATE INDEX `idx_KtpMErDe1C` ON `documents` (`campaign`)"
|
||||
]
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_3332084752")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"indexes": [
|
||||
"CREATE INDEX `idx_gxNj5R3hxv` ON `documents` (`type`)"
|
||||
]
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user