Skip to content

Commit

Permalink
chore: add editable feature ids to votable features (#2424)
Browse files Browse the repository at this point in the history
* migration to add feature ids

* use identifer as identifer name
  • Loading branch information
lbiedinger authored Aug 21, 2024
1 parent 273b471 commit ca53b3c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/contentful/migrations/0144-add-id-to-votable-feature.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = function(migration) {
const voteableFeature = migration.editContentType('voteableFeature');

voteableFeature
.createField('identifier')
.name('Identifier')
.type('Symbol')
.localized(true)
.required(true)
.validations([{ size: { max: 100 },
message: 'Text must be max. 100 characters.' }])
.disabled(false)
.omitted(false);

voteableFeature.changeFieldControl('identifier', 'builtin', 'slugEditor', {});

voteableFeature
.moveField('identifier')
.afterField('name');
};

0 comments on commit ca53b3c

Please sign in to comment.