mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-10-27 05:29:03 +08:00
feat(web): add PocketBase backend with migrations and database
This commit is contained in:
26
web/backend/pb_migrations/1759318802_updated_submission.js
Normal file
26
web/backend/pb_migrations/1759318802_updated_submission.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"indexes": [
|
||||
"CREATE UNIQUE INDEX `idx_vB4iK1BfdV` ON `submissions` (`name`)"
|
||||
],
|
||||
"name": "submissions"
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"indexes": [
|
||||
"CREATE UNIQUE INDEX `idx_vB4iK1BfdV` ON `submission` (`name`)"
|
||||
],
|
||||
"name": "submission"
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
})
|
||||
Reference in New Issue
Block a user