/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
  const dao = new Dao(db)
  const collection = dao.findCollectionByNameOrId("b3bw2apayoyh7um")

  collection.viewRule = "@request.auth.id != \"\" && members.id ?= @request.auth.id"

  return dao.saveCollection(collection)
}, (db) => {
  const dao = new Dao(db)
  const collection = dao.findCollectionByNameOrId("b3bw2apayoyh7um")

  collection.viewRule = null

  return dao.saveCollection(collection)
})
