-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c21c78d
commit 7369e75
Showing
10 changed files
with
148 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
momentum-backend/pb_migrations/1686915608_updated_repositories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
migrate((db) => { | ||
const dao = new Dao(db) | ||
const collection = dao.findCollectionByNameOrId("os5ld33mgj3dj7b") | ||
|
||
// add | ||
collection.schema.addField(new SchemaField({ | ||
"system": false, | ||
"id": "nmmegt3m", | ||
"name": "applications", | ||
"type": "relation", | ||
"required": false, | ||
"unique": false, | ||
"options": { | ||
"collectionId": "wf40hpyi2wvpb7y", | ||
"cascadeDelete": false, | ||
"minSelect": null, | ||
"maxSelect": null, | ||
"displayFields": [] | ||
} | ||
})) | ||
|
||
return dao.saveCollection(collection) | ||
}, (db) => { | ||
const dao = new Dao(db) | ||
const collection = dao.findCollectionByNameOrId("os5ld33mgj3dj7b") | ||
|
||
// remove | ||
collection.schema.removeField("nmmegt3m") | ||
|
||
return dao.saveCollection(collection) | ||
}) |
33 changes: 33 additions & 0 deletions
33
momentum-backend/pb_migrations/1686919800_updated_repositories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
migrate((db) => { | ||
const dao = new Dao(db) | ||
const collection = dao.findCollectionByNameOrId("os5ld33mgj3dj7b") | ||
|
||
// remove | ||
collection.schema.removeField("r3jb5rhz") | ||
|
||
return dao.saveCollection(collection) | ||
}, (db) => { | ||
const dao = new Dao(db) | ||
const collection = dao.findCollectionByNameOrId("os5ld33mgj3dj7b") | ||
|
||
// add | ||
collection.schema.addField(new SchemaField({ | ||
"system": false, | ||
"id": "r3jb5rhz", | ||
"name": "status", | ||
"type": "select", | ||
"required": true, | ||
"unique": false, | ||
"options": { | ||
"maxSelect": 1, | ||
"values": [ | ||
"PENDING", | ||
"SYNCING", | ||
"UP-TO-DATE", | ||
"ERROR" | ||
] | ||
} | ||
})) | ||
|
||
return dao.saveCollection(collection) | ||
}) |