Skip to content

Commit

Permalink
build(webapp): Upgrade conform based on advisory, add cascade delete …
Browse files Browse the repository at this point in the history
…to boards
  • Loading branch information
islami00 committed Apr 24, 2024
1 parent fb660eb commit 1ffc4f1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 25 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
"vite": "^5.1.6"
},
"dependencies": {
"@conform-to/dom": "^1.1.0",
"@conform-to/react": "^1.1.0",
"@conform-to/yup": "^1.1.0",
"@conform-to/zod": "^1.1.0",
"@conform-to/dom": "^1.1.2",
"@conform-to/react": "^1.1.2",
"@conform-to/yup": "^1.1.2",
"@conform-to/zod": "^1.1.2",
"@ebay/nice-modal-react": "^1.2.13",
"@epic-web/invariant": "^1.0.0",
"@fontsource-variable/open-sans": "^5.0.28",
Expand Down Expand Up @@ -94,4 +94,4 @@
"@types/react-dom": "$@types/react-dom"
}
}
}
}
48 changes: 48 additions & 0 deletions packages/webapp/pb_migrations/1713950862_updated_board.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("i233fli6okl1593")

// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "d6pgweur",
"name": "departmentId",
"type": "relation",
"required": true,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dq3cwmn9bka1qx5",
"cascadeDelete": true,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))

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

// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "d6pgweur",
"name": "departmentId",
"type": "relation",
"required": true,
"presentable": false,
"unique": false,
"options": {
"collectionId": "dq3cwmn9bka1qx5",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))

return dao.saveCollection(collection)
})
40 changes: 20 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ffc4f1

Please sign in to comment.