28 lines
915 B
JavaScript
28 lines
915 B
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_617371094")
|
|
|
|
// update collection data
|
|
unmarshal({
|
|
"indexes": [
|
|
"CREATE INDEX `idx_relationships_documents` ON `relationships` (\n `primary`,\n `secondary`\n)",
|
|
"CREATE INDEX `idx_relationships_types` ON `relationships` (`type`)",
|
|
"CREATE UNIQUE INDEX `idx_relationships_primary_type` ON `relationships` (\n `primary`,\n `type`\n)"
|
|
]
|
|
}, collection)
|
|
|
|
return app.save(collection)
|
|
}, (app) => {
|
|
const collection = app.findCollectionByNameOrId("pbc_617371094")
|
|
|
|
// update collection data
|
|
unmarshal({
|
|
"indexes": [
|
|
"CREATE INDEX `idx_relationships_documents` ON `relationships` (\n `primary`,\n `secondary`\n)",
|
|
"CREATE INDEX `idx_relationships_types` ON `relationships` (`type`)"
|
|
]
|
|
}, collection)
|
|
|
|
return app.save(collection)
|
|
})
|