-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add manuscript status migration (#4403)
- Loading branch information
1 parent
e80acd1
commit 12c4f23
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
packages/contentful/migrations/crn/manuscripts/20241003122628-add-status.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,34 @@ | ||
module.exports.description = 'Add status to manuscript'; | ||
|
||
module.exports.up = (migration) => { | ||
const manuscript = migration.editContentType('manuscripts'); | ||
|
||
manuscript | ||
.createField('status') | ||
.name('Status') | ||
.type('Symbol') | ||
.localized(false) | ||
.required(false) | ||
.validations([ | ||
{ | ||
in: [ | ||
'Waiting for Report', | ||
'Review Compliance Report', | ||
'Waiting for ASAP Reply', | ||
"Waiting for Grantee's Reply", | ||
'Manuscript Resubmitted', | ||
'Submit Final Publication', | ||
'Addendum Required', | ||
'Compliant', | ||
'Closed (other)', | ||
], | ||
}, | ||
]) | ||
.disabled(false) | ||
.omitted(false); | ||
}; | ||
|
||
module.exports.down = (migration) => { | ||
const manuscript = migration.editContentType('manuscripts'); | ||
manuscript.deleteField('status'); | ||
}; |